@withgateway/sdk 0.4.0 → 0.6.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/dist/cli.js +1128 -783
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +1130 -785
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +47 -18
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +47 -18
- package/dist/files/index.mjs.map +1 -1
- package/dist/{index-mJhG3vZU.d.mts → index-Di9nNqOY.d.mts} +26 -3
- package/dist/{index-DUHmS74p.d.ts → index-LA-PMRJT.d.ts} +26 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +179 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +176 -43
- package/dist/index.mjs.map +1 -1
- package/dist/replay/index.d.mts +1 -1
- package/dist/replay/index.d.ts +1 -1
- package/dist/replay/index.js.map +1 -1
- package/dist/replay/index.mjs.map +1 -1
- package/dist/traces/index.js +47 -18
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +47 -18
- package/dist/traces/index.mjs.map +1 -1
- package/dist/tracing/index.d.mts +1 -1
- package/dist/tracing/index.d.ts +1 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +184 -85
- package/dist/worlds/index.d.ts +184 -85
- package/dist/worlds/index.js +176 -43
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +176 -43
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/gatewaysdk/environment/_bundle.py +4 -6
- package/runtime/gatewaysdk/environment/_world.py +24 -1
- package/runtime/gatewaysdk/environment/runtime.py +45 -2
- package/runtime/gatewaysdk/environment/schema/api.py +24 -3
- package/runtime/gatewaysdk/environment/schema/bundle_runtime.py +1 -0
- package/runtime/gatewaysdk/environment/schema/call_capture.py +13 -1
- package/runtime/gatewaysdk/environment/schema/call_log.py +46 -0
- package/runtime/gatewaysdk/environment/schema/call_redaction.py +6 -0
- package/runtime/gatewaysdk/environment/schema/compiler.py +4 -1
- package/runtime/gatewaysdk/environment/schema/conform.py +32 -8
- package/runtime/gatewaysdk/environment/schema/connector.py +5 -0
- package/runtime/gatewaysdk/environment/schema/connectors/custom/handlers.py +2 -1
- package/runtime/gatewaysdk/environment/schema/connectors/github/api/handlers.py +217 -58
- package/runtime/gatewaysdk/environment/schema/connectors/github/connector.toml +9 -19
- package/runtime/gatewaysdk/environment/schema/connectors/github/scenarios/default/seed/github_webhooks.json +10 -2
- package/runtime/gatewaysdk/environment/schema/connectors/github/tests/webhooks.json +47 -0
- package/runtime/gatewaysdk/environment/schema/connectors/github/world.json +21 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/api/handlers.py +185 -18
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/connector.toml +29 -14
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/provenance.json +43 -12
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scenarios/default/seed/jamf_webhooks.json +2 -2
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/scope.toml +4 -17
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/tests/webhooks.json +107 -0
- package/runtime/gatewaysdk/environment/schema/connectors/jamf/vendor-openapi.json +1 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/api/handlers.py +85 -1
- package/runtime/gatewaysdk/environment/schema/connectors/linear/connector.toml +19 -31
- package/runtime/gatewaysdk/environment/schema/connectors/linear/provenance.json +18 -8
- package/runtime/gatewaysdk/environment/schema/connectors/linear/scenarios/default/seed/webhooks.json +19 -3
- package/runtime/gatewaysdk/environment/schema/connectors/linear/tests/test_webhooks.py +71 -0
- package/runtime/gatewaysdk/environment/schema/database/guard.py +2 -1
- package/runtime/gatewaysdk/environment/schema/handler_errors.py +27 -1
- package/runtime/gatewaysdk/environment/schema/journal.py +4 -3
- package/runtime/gatewaysdk/environment/schema/local.py +1 -0
- package/runtime/gatewaysdk/environment/schema/openapi_schemas.py +20 -5
- package/runtime/gatewaysdk/environment/schema/platform.py +16 -219
- package/runtime/gatewaysdk/environment/schema/runtime.py +7 -0
- package/runtime/gatewaysdk/environment/schema/scaffold.py +2 -1
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/SKILL.md +19 -22
- package/runtime/gatewaysdk/environment/schema/skills/world-data-ingestion/SKILL.md +7 -9
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +3 -3
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/cli-mcp-map.md +14 -11
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/references/gotchas.md +36 -5
- package/runtime/gatewaysdk/environment/schema/snapshot.py +2 -2
- package/runtime/gatewaysdk/environment/schema/tools_world.py +19 -0
- package/runtime/gatewaysdk/environment/schema/verbs.py +6 -0
- package/runtime/gatewaysdk/environment/schema/webhooks.py +687 -0
- package/runtime/gatewaysdk/environment/schema/world_host.py +20 -3
- package/runtime/gatewaysdk/environment/schema/world_tests.py +74 -0
- package/skills/connector-schema-authoring/CONNECTORS.md +3 -3
- package/skills/connector-schema-authoring/SKILL.md +19 -22
- package/skills/connector-schema-authoring/connector-worlds.md +153 -11
- package/skills/connector-schema-authoring/world-schema.md +7 -6
- package/skills/world-data-ingestion/SKILL.md +7 -9
- package/skills/worlds-getting-started/SKILL.md +3 -3
- package/skills/worlds-getting-started/references/cli-mcp-map.md +14 -11
- package/skills/worlds-getting-started/references/gotchas.md +36 -5
|
@@ -26,22 +26,14 @@ from typing import TYPE_CHECKING, Any
|
|
|
26
26
|
|
|
27
27
|
from .._materialize import materialize_template
|
|
28
28
|
from ..world import WorldTree
|
|
29
|
-
from . import ContractError, WorldDatabase, bundle_mode, check_bundle,
|
|
29
|
+
from . import ContractError, WorldDatabase, bundle_mode, check_bundle, platform_import, platform_query
|
|
30
30
|
from . import snapshot as snapshots
|
|
31
31
|
from .cast import world_fields
|
|
32
32
|
from .compiler import CompilePlan, retarget_journals
|
|
33
33
|
from .handler_scan import HandlerScan
|
|
34
34
|
from .redaction import check_world_redaction
|
|
35
35
|
from .scaffold import request_files
|
|
36
|
-
from .validation import
|
|
37
|
-
digest,
|
|
38
|
-
encoded,
|
|
39
|
-
fail,
|
|
40
|
-
journal_paths,
|
|
41
|
-
members,
|
|
42
|
-
nonempty,
|
|
43
|
-
read_json,
|
|
44
|
-
)
|
|
36
|
+
from .validation import encoded, fail
|
|
45
37
|
|
|
46
38
|
if TYPE_CHECKING:
|
|
47
39
|
from .compiler import Contract
|
|
@@ -60,7 +52,6 @@ COMMANDS = (
|
|
|
60
52
|
"template-summary",
|
|
61
53
|
"describe",
|
|
62
54
|
"compile",
|
|
63
|
-
"apply-batch",
|
|
64
55
|
"build-slack",
|
|
65
56
|
"refresh-slack",
|
|
66
57
|
"capture",
|
|
@@ -84,7 +75,6 @@ COMMANDS = (
|
|
|
84
75
|
"call",
|
|
85
76
|
"dry-run",
|
|
86
77
|
)
|
|
87
|
-
PLATFORM_MAPPING = {"id": "platform-agent", "version": "1"}
|
|
88
78
|
|
|
89
79
|
|
|
90
80
|
def compile_world(root: Path) -> dict:
|
|
@@ -131,78 +121,6 @@ def compile_world(root: Path) -> dict:
|
|
|
131
121
|
return {"added": added, "retargeted": retargeted}
|
|
132
122
|
|
|
133
123
|
|
|
134
|
-
def append_batch(root: Path, batch: dict, *, source: str | None = None) -> dict:
|
|
135
|
-
"""Validate then append one platform batch as an immutable refresh journal.
|
|
136
|
-
|
|
137
|
-
``target`` is filled from the compiled contract (a caller-supplied one must
|
|
138
|
-
match); ``mapping`` and ``coverage`` default to the platform mapping and
|
|
139
|
-
``partial``. Mutations without ``source`` take ``{"record": "<source>#<n>"}``
|
|
140
|
-
when a source prefix is given, otherwise provenance is required per mutation.
|
|
141
|
-
Replaying every prior journal first makes a repeated batch id idempotent and
|
|
142
|
-
a reused id with different content a conflict, exactly as in the store.
|
|
143
|
-
"""
|
|
144
|
-
snapshots.refuse_pinned_rows(root)
|
|
145
|
-
contract = check_bundle(root)
|
|
146
|
-
members(
|
|
147
|
-
batch,
|
|
148
|
-
{"id", "target", "mapping", "coverage", "mutations"},
|
|
149
|
-
{"id", "mutations"},
|
|
150
|
-
"/batch",
|
|
151
|
-
)
|
|
152
|
-
nonempty(batch["id"], "/batch/id")
|
|
153
|
-
if "target" in batch and not contract.targets(batch["target"]):
|
|
154
|
-
fail(
|
|
155
|
-
"batch_target",
|
|
156
|
-
"Batch targets a different domain identity/version/hash",
|
|
157
|
-
"/batch/target",
|
|
158
|
-
)
|
|
159
|
-
if not isinstance(batch["mutations"], list) or not batch["mutations"]:
|
|
160
|
-
fail("batch", "mutations must be a non-empty array", "/batch/mutations")
|
|
161
|
-
mutations = []
|
|
162
|
-
for index, mutation in enumerate(batch["mutations"]):
|
|
163
|
-
if not isinstance(mutation, dict):
|
|
164
|
-
fail("batch", "Each mutation must be an object", f"/batch/mutations/{index}")
|
|
165
|
-
if "source" not in mutation:
|
|
166
|
-
if source is None:
|
|
167
|
-
fail(
|
|
168
|
-
"provenance",
|
|
169
|
-
"Mutation has no source; pass a source prefix or a source.record per mutation",
|
|
170
|
-
f"/batch/mutations/{index}/source",
|
|
171
|
-
)
|
|
172
|
-
mutation = {**mutation, "source": {"record": f"{source}#{index}"}}
|
|
173
|
-
mutations.append(mutation)
|
|
174
|
-
resolved = {
|
|
175
|
-
"id": batch["id"],
|
|
176
|
-
"target": contract.target,
|
|
177
|
-
"mapping": batch.get("mapping", PLATFORM_MAPPING),
|
|
178
|
-
"coverage": batch.get("coverage", "partial"),
|
|
179
|
-
"mutations": mutations,
|
|
180
|
-
}
|
|
181
|
-
journals = journal_paths(root)
|
|
182
|
-
with (
|
|
183
|
-
tempfile.TemporaryDirectory(prefix="gateway-apply-batch-") as temporary,
|
|
184
|
-
WorldDatabase.create(Path(temporary) / "world.db", contract) as store,
|
|
185
|
-
):
|
|
186
|
-
for path in journals:
|
|
187
|
-
store.apply_batch(read_json(path))
|
|
188
|
-
result = store.apply_batch(resolved)
|
|
189
|
-
store.audit()
|
|
190
|
-
if result["status"] == "already_applied":
|
|
191
|
-
return result
|
|
192
|
-
batches = root / "data/batches"
|
|
193
|
-
batches.mkdir(exist_ok=True)
|
|
194
|
-
existing = len(journals) - 1
|
|
195
|
-
target = batches / f"{existing + 1:06d}-{digest(batch['id'].encode())[:16]}.json"
|
|
196
|
-
target.write_bytes(encoded(resolved))
|
|
197
|
-
if snapshots.has_default_snapshot(root):
|
|
198
|
-
# A snapshot built before this batch would be served over the grown journals.
|
|
199
|
-
from .compiler import build
|
|
200
|
-
from .snapshot import build_all
|
|
201
|
-
|
|
202
|
-
build_all(root, build(root))
|
|
203
|
-
return {**result, "journal": str(target.relative_to(root))}
|
|
204
|
-
|
|
205
|
-
|
|
206
124
|
def validate_bundle(bundle: str | Path, *, execute: bool = False) -> dict:
|
|
207
125
|
"""Check a schema world: the contract, the handlers by syntax and by name, the
|
|
208
126
|
initial state, every verifier over it, the tasks and the links. ``execute``
|
|
@@ -257,8 +175,6 @@ def validate_bundle(bundle: str | Path, *, execute: bool = False) -> dict:
|
|
|
257
175
|
|
|
258
176
|
|
|
259
177
|
def _check_mappings(bundle: Path, contract: Contract) -> None:
|
|
260
|
-
"""Each ``[dependencies.<alias>.entities]`` mapping against this contract
|
|
261
|
-
and, for a dependency whose ``path`` is here, against that contract too."""
|
|
262
178
|
from .. import _bundle
|
|
263
179
|
from .dependencies import check_mappings, parse_dependencies
|
|
264
180
|
|
|
@@ -278,12 +194,6 @@ def _field_map(contract: Contract) -> FieldMap:
|
|
|
278
194
|
|
|
279
195
|
|
|
280
196
|
def _attach_dependencies(bundle: Path, store: WorldDatabase, staging: Path) -> dict[str, str]:
|
|
281
|
-
"""Each ``[dependencies]`` entry whose local ``path`` is on this machine,
|
|
282
|
-
materialized beside the root's store and attached as ``<alias>.<table>``,
|
|
283
|
-
so a cross-world verifier runs here the way it runs in a session. Returns
|
|
284
|
-
the aliases left unattached, each with why: a pin without a path is the
|
|
285
|
-
platform's to resolve; a path that is not here (the platform checking a
|
|
286
|
-
pushed tree) resolves there too."""
|
|
287
197
|
from .. import _bundle
|
|
288
198
|
from .dependencies import parse_dependencies
|
|
289
199
|
|
|
@@ -310,13 +220,7 @@ def _attach_dependencies(bundle: Path, store: WorldDatabase, staging: Path) -> d
|
|
|
310
220
|
|
|
311
221
|
|
|
312
222
|
def _check_verifiers(bundle: Path, store: WorldDatabase, unattached: dict[str, str], *, scored: bool) -> dict[str, Any]:
|
|
313
|
-
"""
|
|
314
|
-
read-only authorizer, the way a session grades. A verifier that names a
|
|
315
|
-
table or column the contract lacks is refused here — at check — not at
|
|
316
|
-
the first grade. ``scored`` reports the score over the initial state by
|
|
317
|
-
the one :class:`SqlVerifier` rule a grade applies. A verifier that reads
|
|
318
|
-
a dependency the check could not attach (a pin without a local path) is
|
|
319
|
-
reported, not refused: it runs where the platform opens the link."""
|
|
223
|
+
"""A verifier over a dependency the check could not attach is reported, not refused: it runs on the platform."""
|
|
320
224
|
verifiers_dir = bundle / "verifiers"
|
|
321
225
|
if not verifiers_dir.is_dir():
|
|
322
226
|
return {}
|
|
@@ -350,8 +254,6 @@ def _check_verifier(path: Path, store: WorldDatabase, unattached: dict[str, str]
|
|
|
350
254
|
|
|
351
255
|
|
|
352
256
|
def _refuse_verifier(path: Path, store: WorldDatabase, unattached: dict[str, str], error: ContractError) -> str:
|
|
353
|
-
"""The unattached dependency alias the failure names — the one refusal
|
|
354
|
-
check reports rather than raises; every other failure is refused here."""
|
|
355
257
|
reason = error.__cause__ if error.__cause__ is not None else error.detail["message"]
|
|
356
258
|
missing = store.missing_table(reason)
|
|
357
259
|
alias = _missing_dependency_alias(missing, unattached)
|
|
@@ -370,7 +272,6 @@ def _refuse_verifier(path: Path, store: WorldDatabase, unattached: dict[str, str
|
|
|
370
272
|
|
|
371
273
|
|
|
372
274
|
def _missing_dependency_alias(table: str | None, unattached: dict[str, str]) -> str | None:
|
|
373
|
-
"""The alias of an unattached dependency a missing ``alias.table`` names, else ``None``."""
|
|
374
275
|
alias, dot, _ = (table or "").partition(".")
|
|
375
276
|
if dot and alias in unattached:
|
|
376
277
|
return alias
|
|
@@ -378,8 +279,6 @@ def _missing_dependency_alias(table: str | None, unattached: dict[str, str]) ->
|
|
|
378
279
|
|
|
379
280
|
|
|
380
281
|
def _check_tasks(bundle: Path, verifiers: list[str]) -> list[dict[str, Any]]:
|
|
381
|
-
"""The tasks the world declares (``[[tasks]]``, ``tasks.jsonl``/``.json``,
|
|
382
|
-
else one per verifier), each checked to name verifiers the world has."""
|
|
383
282
|
from .. import _bundle
|
|
384
283
|
from .tools_world import load_tasks
|
|
385
284
|
|
|
@@ -448,14 +347,7 @@ def may_execute() -> bool:
|
|
|
448
347
|
|
|
449
348
|
|
|
450
349
|
def _handler_execution(bundle: Path, execute: bool, declared: set[str], *, hosted: bool) -> dict[str, Any]:
|
|
451
|
-
"""
|
|
452
|
-
``[dependencies]`` opened from their paths — one session of the world,
|
|
453
|
-
opened and closed. Only where authored code may run, and only over rows this
|
|
454
|
-
tree holds (``hosted``: its data is a snapshot the platform keeps). ``tools`` is
|
|
455
|
-
the declared handlers the session bound (the report's top-level ``tools``);
|
|
456
|
-
``served`` every name ``worlds call`` answers there — the handlers and a
|
|
457
|
-
dependency's ``alias.tool``; a connector route answers over HTTP, never by
|
|
458
|
-
name — so the two lists differ by design and say what each counts."""
|
|
350
|
+
"""``tools`` counts bound declared handlers, ``served`` each name ``worlds call`` answers: they differ by design."""
|
|
459
351
|
if not execute:
|
|
460
352
|
return {
|
|
461
353
|
"status": "not_run",
|
|
@@ -580,10 +472,7 @@ def _archive_files(encoded: str) -> list:
|
|
|
580
472
|
|
|
581
473
|
|
|
582
474
|
def _capture(request: dict) -> dict:
|
|
583
|
-
"""
|
|
584
|
-
egress the vendor allow-listed. The spec arrives as text, the credential as the
|
|
585
|
-
environment variable it names (set by the caller, never in the request), and every
|
|
586
|
-
recorded page comes back redacted the way the CLI would have written it."""
|
|
475
|
+
"""The credential is the env variable the spec names, never in the request; pages come back redacted."""
|
|
587
476
|
from .connector import CAPTURES, MANIFEST, capture, pairs_of, parse_spec
|
|
588
477
|
|
|
589
478
|
spec_text = request.get("spec")
|
|
@@ -624,12 +513,7 @@ def _capture(request: dict) -> dict:
|
|
|
624
513
|
|
|
625
514
|
|
|
626
515
|
def _redact_summary(spec: "Spec | RedactPolicy") -> dict:
|
|
627
|
-
"""
|
|
628
|
-
stored form from these lists without running Python. ``slug`` is the SALT —
|
|
629
|
-
the connector's slug from connector.toml (``[environment].name`` for a tools-only
|
|
630
|
-
world's gateway-env.toml), which is what ``_digest`` hashes under — and not the
|
|
631
|
-
platform world slug, which may differ (``spycloud`` vs ``spycloud-world``); a caller
|
|
632
|
-
that salts with the wrong one never matches a row."""
|
|
516
|
+
"""``slug`` is the salt ``_digest`` hashes under: the connector's slug, not the platform world slug."""
|
|
633
517
|
return {
|
|
634
518
|
"slug": spec.slug,
|
|
635
519
|
"hash": sorted(spec.hash_fields),
|
|
@@ -640,9 +524,6 @@ def _redact_summary(spec: "Spec | RedactPolicy") -> dict:
|
|
|
640
524
|
|
|
641
525
|
|
|
642
526
|
def _annotate_redaction(entities: list[dict], spec: "Spec | RedactPolicy | None") -> None:
|
|
643
|
-
"""Stamp every field with the policy it is stored under (``hash``, ``drop``,
|
|
644
|
-
``preserve``, ``round:<n>`` or None), so a reader knows whether it can be looked
|
|
645
|
-
up by plaintext, by digest, or not at all."""
|
|
646
527
|
from .connector import redaction_of
|
|
647
528
|
|
|
648
529
|
for entity in entities:
|
|
@@ -651,9 +532,7 @@ def _annotate_redaction(entities: list[dict], spec: "Spec | RedactPolicy | None"
|
|
|
651
532
|
|
|
652
533
|
|
|
653
534
|
def _template_summary(files: dict[str, bytes]) -> dict:
|
|
654
|
-
"""
|
|
655
|
-
(connector.toml) and the data model (world.json), plus the digest the platform
|
|
656
|
-
pins worlds to. Never runs the template's Python."""
|
|
535
|
+
"""Never runs the template's Python."""
|
|
657
536
|
from .connector import bind_spec, parse_spec
|
|
658
537
|
from .redaction import parse_env_policy
|
|
659
538
|
from .scaffold import template_digest
|
|
@@ -735,14 +614,7 @@ DESCRIBE_PATHS = (
|
|
|
735
614
|
|
|
736
615
|
|
|
737
616
|
def _describe(request: dict) -> dict:
|
|
738
|
-
"""
|
|
739
|
-
model, the tools with their schemas, and — when the connector declares a vendor
|
|
740
|
-
connection — the OpenAPI document the served world answers to.
|
|
741
|
-
|
|
742
|
-
The connector is compiled exactly as a world build compiles it (an installed
|
|
743
|
-
template by slug, or a template's files), so the page shows what a world gets;
|
|
744
|
-
a compiled world's own files (``schema/world.json`` + ``tool-schemas.json``) pass
|
|
745
|
-
straight through. Never runs the connector's Python."""
|
|
617
|
+
"""Never runs the connector's Python."""
|
|
746
618
|
from .connector import load_spec, parse_spec
|
|
747
619
|
from .redaction import env_policy
|
|
748
620
|
from .scaffold import (
|
|
@@ -838,18 +710,7 @@ def _describe(request: dict) -> dict:
|
|
|
838
710
|
|
|
839
711
|
|
|
840
712
|
def _ingest_calls(request: dict) -> dict:
|
|
841
|
-
"""
|
|
842
|
-
of ``import-data`` for the record contract of :mod:`.ingest`. The tree arrives
|
|
843
|
-
as ``[{path, content}]``, the records as a list, with ``redact`` (off by
|
|
844
|
-
default), ``dry_run``, ``mode`` and optionally ``map`` — an ``ingest.toml``
|
|
845
|
-
text or its parsed table (:mod:`.mapping`). Without ``map`` the world's own
|
|
846
|
-
``ingest.toml`` applies when it has one, else each record's tool resolves to
|
|
847
|
-
an operation of ``connector.toml`` and its result is projected the way a
|
|
848
|
-
capture is (:func:`ingest.ingest_records`). Transforms never run here: they
|
|
849
|
-
are the agent's code and run where the agent is. The answer is the report
|
|
850
|
-
plus the projected ``rows`` (``{entity: [row, …]}``, so a caller can push
|
|
851
|
-
them through the batch lane itself) and, when the tree changed, every file
|
|
852
|
-
of the updated tree the way ``import-data`` returns one."""
|
|
713
|
+
"""Transforms never run here: they are the caller's code and run where the caller is."""
|
|
853
714
|
from .data import KIND_SCHEMA, MODES
|
|
854
715
|
from .ingest import ingest_records
|
|
855
716
|
from .redaction import parse_mode
|
|
@@ -892,7 +753,6 @@ def _ingest_calls(request: dict) -> dict:
|
|
|
892
753
|
|
|
893
754
|
|
|
894
755
|
def _workdir(request: dict) -> Path:
|
|
895
|
-
"""The absolute directory the caller prepared; every path in the request is under it."""
|
|
896
756
|
workdir = request.get("workdir")
|
|
897
757
|
if not isinstance(workdir, str) or not workdir or not Path(workdir).is_absolute() or not Path(workdir).is_dir():
|
|
898
758
|
fail(
|
|
@@ -940,8 +800,6 @@ def _chunk_specs(workdir: Path, request: dict) -> list:
|
|
|
940
800
|
|
|
941
801
|
|
|
942
802
|
def _tree(root: Path) -> list:
|
|
943
|
-
"""Every file under ``root`` as ``[{path, content}]``, the encoding ``init-template``
|
|
944
|
-
returns, so the platform commits a version without knowing which file changed."""
|
|
945
803
|
return [
|
|
946
804
|
{
|
|
947
805
|
"path": path.relative_to(root).as_posix(),
|
|
@@ -953,8 +811,7 @@ def _tree(root: Path) -> list:
|
|
|
953
811
|
|
|
954
812
|
|
|
955
813
|
def _write_tree(workdir: Path, request: dict) -> Path:
|
|
956
|
-
"""
|
|
957
|
-
contract alone is enough: generated artifacts are regenerated, snapshots are not)."""
|
|
814
|
+
"""Compiled from the contract alone: generated artifacts are regenerated, snapshots are not."""
|
|
958
815
|
from .compiler import compile_bundle
|
|
959
816
|
|
|
960
817
|
root = workdir / "tree"
|
|
@@ -975,8 +832,6 @@ def _flag(request: dict, name: str, default: bool) -> bool:
|
|
|
975
832
|
|
|
976
833
|
|
|
977
834
|
def _validate_rows(request: dict) -> dict:
|
|
978
|
-
"""``validate-rows``: shape-only validation of every row in the chunks (type, bounds,
|
|
979
|
-
required, unknown property, primary key present); no reference checks."""
|
|
980
835
|
from .batch import validate_chunks
|
|
981
836
|
from .compiler import check_bundle
|
|
982
837
|
from .data import MODES
|
|
@@ -990,7 +845,6 @@ def _validate_rows(request: dict) -> dict:
|
|
|
990
845
|
|
|
991
846
|
|
|
992
847
|
def _redactor(root: Path, request: dict):
|
|
993
|
-
"""The batch's redaction hook from ``request.redact`` (off | apply | refuse)."""
|
|
994
848
|
from .redaction import parse_mode, require_policy, row_redactor
|
|
995
849
|
|
|
996
850
|
redact = parse_mode(request.get("redact"))
|
|
@@ -998,11 +852,6 @@ def _redactor(root: Path, request: dict):
|
|
|
998
852
|
|
|
999
853
|
|
|
1000
854
|
def _snapshot_build(request: dict) -> dict:
|
|
1001
|
-
"""``snapshot-build``: the parent snapshot (or the tree's default), carried to the
|
|
1002
|
-
tree's contract when that only adds to the domain its rows were stored under, with
|
|
1003
|
-
the chunks applied in dependency order, one transaction (atomic) or one per chunk;
|
|
1004
|
-
the new snapshot saved under workdir with its sidecar (its absolute path answered),
|
|
1005
|
-
or nothing on dryRun or an atomic refusal."""
|
|
1006
855
|
from .batch import build_batch
|
|
1007
856
|
from .compiler import check_bundle
|
|
1008
857
|
from .data import MERGES, MODES
|
|
@@ -1061,8 +910,6 @@ def _snapshot_build(request: dict) -> dict:
|
|
|
1061
910
|
|
|
1062
911
|
|
|
1063
912
|
def _snapshot_default(request: dict) -> dict:
|
|
1064
|
-
"""``snapshot-default``: the tree's default snapshot and every scenario snapshot,
|
|
1065
|
-
built under ``workdir/tree``; the sidecars come back with absolute paths."""
|
|
1066
913
|
from .compiler import check_bundle
|
|
1067
914
|
from .snapshot import build_all, build_default, default_snapshot, scenario_snapshot
|
|
1068
915
|
|
|
@@ -1084,8 +931,6 @@ def _snapshot_default(request: dict) -> dict:
|
|
|
1084
931
|
|
|
1085
932
|
|
|
1086
933
|
def _api_bundle(request: dict) -> dict:
|
|
1087
|
-
"""The api-kind bundle that hosts a world's API, built from the world's files:
|
|
1088
|
-
what `gateway worlds schema api-bundle` writes locally, for a CLI with no Python."""
|
|
1089
934
|
from .api import build_api_bundle
|
|
1090
935
|
|
|
1091
936
|
files = request_files(request)
|
|
@@ -1102,9 +947,7 @@ def _api_bundle(request: dict) -> dict:
|
|
|
1102
947
|
|
|
1103
948
|
|
|
1104
949
|
def _ingest(request: dict) -> dict:
|
|
1105
|
-
"""
|
|
1106
|
-
seeded from those captures through the contract exactly as the CLI does, and the
|
|
1107
|
-
whole updated tree handed back. Runs no Python of the world's own."""
|
|
950
|
+
"""Runs no Python of the world's own."""
|
|
1108
951
|
from .connector import check, ingest
|
|
1109
952
|
|
|
1110
953
|
batch_id = request.get("batch_id")
|
|
@@ -1124,9 +967,6 @@ def _ingest(request: dict) -> dict:
|
|
|
1124
967
|
|
|
1125
968
|
|
|
1126
969
|
def _reconcile(request: dict) -> dict:
|
|
1127
|
-
"""``reconcile``: the world's contract against its captured rows (see
|
|
1128
|
-
:mod:`reconcile`); the report of every change, and with ``write`` the updated
|
|
1129
|
-
tree (``schema/world.json`` rewritten and recompiled)."""
|
|
1130
970
|
from .reconcile import SOURCES, reconcile
|
|
1131
971
|
|
|
1132
972
|
source = request.get("from", "captures")
|
|
@@ -1148,9 +988,7 @@ def _reconcile(request: dict) -> dict:
|
|
|
1148
988
|
|
|
1149
989
|
|
|
1150
990
|
def _conform(request: dict) -> dict:
|
|
1151
|
-
"""``
|
|
1152
|
-
against the vendor's OpenAPI documents. The report is the one ``connector conform
|
|
1153
|
-
--out`` writes; ``world`` names the bundle, never the bridge's scratch path."""
|
|
991
|
+
"""``world`` names the bundle, never the bridge's scratch path."""
|
|
1154
992
|
from .conform import conform
|
|
1155
993
|
|
|
1156
994
|
documents = request.get("openapi")
|
|
@@ -1175,10 +1013,6 @@ def _conform(request: dict) -> dict:
|
|
|
1175
1013
|
|
|
1176
1014
|
|
|
1177
1015
|
def _run_tests(request: dict) -> dict:
|
|
1178
|
-
"""``run-tests``: serve the world at these files in the bridge and run the tests it
|
|
1179
|
-
ships under ``tests/`` (see :mod:`world_tests`). ``scenario`` starts the world in one
|
|
1180
|
-
of its scenarios; ``snapshot`` ({url, sha256, digest}) lays a pinned data snapshot
|
|
1181
|
-
into the tree first, so a data-only version is tested with its rows."""
|
|
1182
1016
|
from .snapshot import fetch as fetch_snapshot
|
|
1183
1017
|
from .world_tests import run
|
|
1184
1018
|
|
|
@@ -1200,10 +1034,7 @@ def _run_tests(request: dict) -> dict:
|
|
|
1200
1034
|
|
|
1201
1035
|
|
|
1202
1036
|
def _prepared_tree(request: dict) -> Path:
|
|
1203
|
-
"""The
|
|
1204
|
-
relative path under it, beside any snapshot it checked out — opened in place.
|
|
1205
|
-
Every path is validated against the workdir (:func:`_under`); the workdir is
|
|
1206
|
-
the caller's to remove."""
|
|
1037
|
+
"""The workdir is the caller's to remove; Python never deletes it."""
|
|
1207
1038
|
if request.get("files") is not None or request.get("world") is not None:
|
|
1208
1039
|
fail("input", "a request opens its world through one of workdir, files or world")
|
|
1209
1040
|
workdir = _workdir(request)
|
|
@@ -1214,12 +1045,6 @@ def _prepared_tree(request: dict) -> Path:
|
|
|
1214
1045
|
|
|
1215
1046
|
|
|
1216
1047
|
def _world_for(request: dict, staging: Path) -> Path:
|
|
1217
|
-
"""The world a run-style command works on: ``files`` laid into ``staging``
|
|
1218
|
-
(what the platform sends for a small tree), the tree under a ``workdir`` the
|
|
1219
|
-
platform prepared (:func:`_prepared_tree`, for a large one), or — where this
|
|
1220
|
-
runtime may run authored code — ``world``, an absolute directory on this
|
|
1221
|
-
machine, opened in place so its ``[dependencies]`` paths resolve and nothing
|
|
1222
|
-
is copied."""
|
|
1223
1048
|
if request.get("workdir") is not None:
|
|
1224
1049
|
return _prepared_tree(request)
|
|
1225
1050
|
if request.get("world") is None:
|
|
@@ -1231,7 +1056,6 @@ def _world_for(request: dict, staging: Path) -> Path:
|
|
|
1231
1056
|
|
|
1232
1057
|
|
|
1233
1058
|
def _local_tree(request: dict) -> Path:
|
|
1234
|
-
"""``world``, opened in place: an absolute directory on this machine, only where this runtime may run authored code."""
|
|
1235
1059
|
world = request.get("world")
|
|
1236
1060
|
if not may_execute():
|
|
1237
1061
|
fail("input", "world is a local-runtime field; this runtime takes files")
|
|
@@ -1241,12 +1065,6 @@ def _local_tree(request: dict) -> Path:
|
|
|
1241
1065
|
|
|
1242
1066
|
|
|
1243
1067
|
def _call(request: dict) -> dict:
|
|
1244
|
-
"""``call``: open the world at ``world`` (a local directory; ``files`` for a
|
|
1245
|
-
tree without dependencies) as one session and call ``tool`` with ``args``,
|
|
1246
|
-
the way the host would — root tools by name, a dependency's as
|
|
1247
|
-
``alias.tool``. The answer is the tool's ``{status, body}``, the state
|
|
1248
|
-
afterwards when ``state`` is asked for, and the grade when ``grade`` is.
|
|
1249
|
-
Only where this runtime may run a world's Python (:func:`may_execute`)."""
|
|
1250
1068
|
from .local import open_world
|
|
1251
1069
|
|
|
1252
1070
|
if not may_execute():
|
|
@@ -1285,15 +1103,6 @@ def _call(request: dict) -> dict:
|
|
|
1285
1103
|
|
|
1286
1104
|
|
|
1287
1105
|
def _dry_run(request: dict) -> dict:
|
|
1288
|
-
"""``dry-run``: open the world at ``world`` under ``task`` exactly as a
|
|
1289
|
-
hosted session would (the task's seed laid, its tools served), grade the
|
|
1290
|
-
UNTOUCHED state with the task's verifiers, and close. The answer is the
|
|
1291
|
-
task card (prompt, tools, verifiers), the state's rows per entity, and
|
|
1292
|
-
``grade`` — or, when a verifier cannot run (bad SQL, a missing entity),
|
|
1293
|
-
``grade: null`` and ``verifier_errors`` naming each verifier that failed
|
|
1294
|
-
with the database engine's own words. That is the point of the dry run: a benchmark
|
|
1295
|
-
whose grader dies is found here, not on the runner. Only where this
|
|
1296
|
-
runtime may run a world's Python (:func:`may_execute`)."""
|
|
1297
1106
|
from ..errors import VerifierError
|
|
1298
1107
|
from .local import open_world
|
|
1299
1108
|
|
|
@@ -1351,9 +1160,7 @@ def _dry_run(request: dict) -> dict:
|
|
|
1351
1160
|
|
|
1352
1161
|
|
|
1353
1162
|
def _templates(request: dict) -> dict:
|
|
1354
|
-
"""
|
|
1355
|
-
(name and description when the document carries them) and whether it declares a
|
|
1356
|
-
vendor connection. Never runs a template's Python."""
|
|
1163
|
+
"""Never runs a template's Python."""
|
|
1357
1164
|
from .scaffold import TEMPLATES, list_templates
|
|
1358
1165
|
from .ui import ui_kind
|
|
1359
1166
|
|
|
@@ -1378,7 +1185,6 @@ def _templates(request: dict) -> dict:
|
|
|
1378
1185
|
|
|
1379
1186
|
|
|
1380
1187
|
def _answering_commands() -> dict:
|
|
1381
|
-
"""The commands that answer on their own, without the shared write-validate-return tree below."""
|
|
1382
1188
|
return {
|
|
1383
1189
|
"validate-rows": _validate_rows,
|
|
1384
1190
|
"snapshot-build": _snapshot_build,
|
|
@@ -1424,25 +1230,16 @@ def execute(request: dict) -> dict:
|
|
|
1424
1230
|
if in_place:
|
|
1425
1231
|
# In place, so the ``[dependencies]`` paths beside it resolve and its snapshots are compiled where they are.
|
|
1426
1232
|
root = _local_tree(request)
|
|
1427
|
-
elif request["command"] in ("validate", "compile", "
|
|
1233
|
+
elif request["command"] in ("validate", "compile", "refresh-slack"):
|
|
1428
1234
|
_write_files(root, request.get("files"))
|
|
1429
|
-
# A schema world's api bundle keeps the world under server/world; the whole tree still travels back.
|
|
1430
1235
|
world = world_root(root)
|
|
1431
1236
|
if request["command"] == "compile":
|
|
1432
|
-
# The
|
|
1237
|
+
# The caller authors schema/world.json; the trusted compiler owns every generated artifact.
|
|
1433
1238
|
extra["compile"] = compile_world(world)
|
|
1434
1239
|
if world != root and (world / "data/initial.json").is_file():
|
|
1435
1240
|
from .api import write_base_seed
|
|
1436
1241
|
|
|
1437
1242
|
write_base_seed(world, root)
|
|
1438
|
-
if request["command"] == "apply-batch":
|
|
1439
|
-
batch, source = request.get("batch"), request.get("source")
|
|
1440
|
-
if not isinstance(batch, dict) or (source is not None and not isinstance(source, str)):
|
|
1441
|
-
fail(
|
|
1442
|
-
"input",
|
|
1443
|
-
"Expected a batch object and an optional source prefix string",
|
|
1444
|
-
)
|
|
1445
|
-
extra["batch"] = append_batch(world, batch, source=source)
|
|
1446
1243
|
if request["command"] == "init-template":
|
|
1447
1244
|
from .scaffold import init_bundle
|
|
1448
1245
|
|
|
@@ -16,6 +16,7 @@ from .dependencies import Dependency
|
|
|
16
16
|
from .grading import Grade, GraderError, TaskGrader
|
|
17
17
|
from .journal import CallsView, WorldJournal
|
|
18
18
|
from .request_ledger import RequestOutbox
|
|
19
|
+
from .webhooks import WebhookPoll
|
|
19
20
|
from .served_names import ServedNames
|
|
20
21
|
from .session_files import CALLS_JOURNAL, LEDGER_JOURNAL, SessionExport
|
|
21
22
|
from .snapshot import SCENARIOS
|
|
@@ -206,6 +207,12 @@ class WorldRuntime(ABC):
|
|
|
206
207
|
def state(self) -> dict:
|
|
207
208
|
return self.calls.into_state(self._rows())
|
|
208
209
|
|
|
210
|
+
def webhooks(self, poll: WebhookPoll) -> dict:
|
|
211
|
+
"""The subscriptions the world's ``[webhooks]`` finds (none declared: ``declared`` false), a page
|
|
212
|
+
of deliveries, and how many of the poll's answers the ledger kept."""
|
|
213
|
+
outbox = self.app.state.webhooks if self.app is not None else None
|
|
214
|
+
return self.calls.webhook_page(outbox, poll)
|
|
215
|
+
|
|
209
216
|
def grader_state(self, report: Optional[str] = None, journal: Optional[WorldJournal] = None) -> dict:
|
|
210
217
|
"""Keys beside the rows (``calls``, ``snapshot``, ``report``, ``gateway_*``) are reserved from entity names."""
|
|
211
218
|
state = self.calls.into_state(self._grader_rows())
|
|
@@ -61,7 +61,8 @@ hosted call into such a handler answers 400 {error: "handler", detail, handler}:
|
|
|
61
61
|
{store}
|
|
62
62
|
|
|
63
63
|
A handler that raises AttributeError, TypeError or NameError is answered 400 with
|
|
64
|
-
that structured body;
|
|
64
|
+
that structured body; `raise Refusal(404, body)` (from gateway_env) answers that 4xx
|
|
65
|
+
and body as the vendor's refusal; any other exception is answered 500 {error: "engine", ...}.
|
|
65
66
|
`schema init --connector custom --with-example-tool` writes the example in full.
|
|
66
67
|
"""
|
|
67
68
|
'''
|
package/runtime/gatewaysdk/environment/schema/skills/connector-schema-authoring/CONNECTORS.md
CHANGED
|
@@ -68,9 +68,9 @@ real row; captured exports from that tenant become the goldens.
|
|
|
68
68
|
| Slug | State | Notes |
|
|
69
69
|
| --- | --- | --- |
|
|
70
70
|
| slack | package 2.1.1 / domain 2.0.0 / mapping 1, spec-derived fields (wave 1) | base; 34 normalized entities / 72 `$defs` / 27 tools; `connector.toml` serves 56 Web API operations from `api/handlers.py` (bearer `SLACK_BOT_TOKEN`, Slack `ok`/`error` envelopes); `scenarios/default` seeds 34 entities / 84 synthetic rows; `vendor-openapi.json` (trimmed, response schemas relocated to OpenAPI 3 `content`) — `connector conform` 51/54 documented operations pass, 3 fail on channel-keyed `file.shares.public` that the 2020 spec stubs empty, `bookmarks.*` undocumented there. `subset`: no live round trip. Empty init or populated synthetic/selected capture → immutable hosted world; [on-demand fixtures](../../../samples/schema-worlds/README.md#slack-fixtures) |
|
|
71
|
-
| github | spec-derived, wave 2 (domain 4.0.0) | base; pinned GitHub REST OpenAPI (`adb01e9`, 2026-09-15) plus the GraphQL review-state declaration. 45 entities / 5,365 recursive fields / 4 tools / 203 served operations (`connector.toml` + `api/handlers.py`; `scenarios/default` seeds 111 rows across every entity; `vendor-openapi.json` trimmed to the served paths, 203/203 conform). The fullest vendor read form is each entity's root (full-repository, public-user, organization-full, team-full, ...) with the narrower forms' required lists intersected where scope.toml lists several read_forms; route containment and nested-scalar projections are direct fields so keys and relationships are enforceable; many-to-many links are membership entities. Issue state/state-reason come from declared REST sibling value blocks; review state from `PullRequestReviewState`; user `type` stays open. 1,026 documented routes unserved, pagination not emulated; `subset` until a test-org round trip and synthetic goldens exist. |
|
|
71
|
+
| github | spec-derived, wave 2 (domain 4.0.0) | base; pinned GitHub REST OpenAPI (`adb01e9`, 2026-09-15) plus the GraphQL review-state declaration. 45 entities / 5,365 recursive fields / 4 tools / 203 served operations (`connector.toml` + `api/handlers.py`; `scenarios/default` seeds 111 rows across every entity; `vendor-openapi.json` trimmed to the served paths, 203/203 conform). The fullest vendor read form is each entity's root (full-repository, public-user, organization-full, team-full, ...) with the narrower forms' required lists intersected where scope.toml lists several read_forms; route containment and nested-scalar projections are direct fields so keys and relationships are enforceable; many-to-many links are membership entities. Issue state/state-reason come from declared REST sibling value blocks; review state from `PullRequestReviewState`; user `type` stays open. 1,026 documented routes unserved, pagination not emulated; `subset` until a test-org round trip and synthetic goldens exist. Sends GitHub's webhooks (`[webhooks]`, `github` signing): `ping`, `issues`, `issue_comment`, `pull_request`, `push`; JSON only, repository hooks only. |
|
|
72
72
|
| salesforce | docs-derived, wave 2 (full-parity expansion) | tenant-shaped skeleton from 99 pinned Winter '27 (API 68.0, doc 264.0) Object Reference pages plus 32 REST API Developer Guide resource pages: 99 entities / 2,519 top-level fields (2,695 recursive) / 215 restrict relationships / 102 closed enums / 14 unique constraints / 4 tools; `connector.toml` serves 332 operations (Resources by Version, Describe Global, sObject Basic Information, sObject Describe, `/query` SOQL subset, `/search` SOSL subset, and per-object retrieve/create/update/delete exactly where each page's Supported Calls lists them) with `api/handlers.py` for the computed routes; `scenarios/default` seeds 2 synthetic rows in every entity (198 rows). **Describe-on-bind is required** for the org's actual fields, relationships, picklists, custom schema, record types and permissions; the served `/describe` answers from the skeleton and says so. Only Restricted picklists with an explicit vendor value block become enums; org-controlled picklists (StageName, Lead.Status, Case Status/Priority/Origin, ...) remain open strings. Single-target `Refers To` fields become relationships; polymorphic (`WhoId`, `WhatId`, Group-or-User owners: 39) and references to unmodelled objects (183) remain ids. Not served, reported: upsert by external id, deleted/updated, queryAll, composite, limits, Bulk/Tooling/Metadata/Streaming, blob bodies. Conformance not applicable: Salesforce publishes only an org-generated OAS3 beta. `subset`: no org describe, Developer Edition/scratch-org round trip or goldens. |
|
|
73
|
-
| linear | SDL-derived, wave 2 | base; transcribed from the pinned linear/linear `packages/sdk/src/schema.graphql` (commit `23f11eb4`). 32 entities / 600 fields / 114 restrict relationships / 16 enums / 4 tools; 150 REST-shaped `connector.toml` operations (55 read, 24 create, 28 update, 23 delete, 20 handler) with a synthetic `default` scenario for every entity. Vendor camelCase is kept; GraphQL non-null is required, nullable is required-but-null. `Project.state` stays despite `@deprecated` because the brief requires it; `Issue.priority` is integer 0..4 from the description. `linear_roadmaps` has no routes because every roadmap root field is `@deprecated`. OpenAPI conformance is not applicable (GraphQL only, no vendor OpenAPI). `subset`: 90 Node types excluded, 28 generated `<field>Id` names unconfirmed, no live introspection or workspace round trip. |
|
|
73
|
+
| linear | SDL-derived, wave 2 | base; transcribed from the pinned linear/linear `packages/sdk/src/schema.graphql` (commit `23f11eb4`). 32 entities / 600 fields / 114 restrict relationships / 16 enums / 4 tools; 150 REST-shaped `connector.toml` operations (55 read, 24 create, 28 update, 23 delete, 20 handler) with a synthetic `default` scenario for every entity. Vendor camelCase is kept; GraphQL non-null is required, nullable is required-but-null. `Project.state` stays despite `@deprecated` because the brief requires it; `Issue.priority` is integer 0..4 from the description. `linear_roadmaps` has no routes because every roadmap root field is `@deprecated`. OpenAPI conformance is not applicable (GraphQL only, no vendor OpenAPI). `subset`: 90 Node types excluded, 28 generated `<field>Id` names unconfirmed, no live introspection or workspace round trip. Sends Linear's webhooks (`[webhooks]`, `linear` signing) for `Issue` and `Comment` create/update/remove, filtered by `resourceTypes` and team. |
|
|
74
74
|
| jira | spec-derived, schema-worlds pass | mixed; `$defs` transcribed from the pinned Jira Cloud platform REST v3 OpenAPI (1001.0.0-SNAPSHOT, 2,473,385 bytes) and the Jira Software Cloud OpenAPI (1001.0.0) for boards/sprints. 21 entities / 65 `$defs` (477 properties) / 32 relationships / 5 tools / 78 `connector.toml` operations (78/78 conform against the trimmed `vendor-openapi.json`). Issues are keyed by immutable `id` with `key` unique; transitions by (`issueId`, `id`); sprint membership is a link entity. `IssueBean.fields` is `{}` in the vendor document, so an authored `IssueFields` `$def` types 38 system-field members and stays open for `customfield_*` overlay values. Enums only where the vendor declares them (`projectTypeKey`, `accountType`, `style`, `assigneeType`, sprint `state` from the `getAllSprints` filter); `StatusCategory.key` stays open. `scenarios/default` seeds every entity synthetically. `subset`: no Jira Cloud round trip, no goldens, Rovo MCP tool parity unverified. |
|
|
75
75
|
| microsoft-teams | authored base, wave 3 (served) | [Usage, artifacts, scope, and pinned evidence](../../../documentation/features/microsoft-teams-schema.md). 19 entities / 81 vendor `$defs` / 0 tools; teams, channels (incoming, shared-with), chats, chat views, team/channel/chat members, channel messages, replies, chat messages, hosted contents, tags, tag members, pinned messages, async operations. `connector.toml`: 99 Graph v1.0 operations (`auth.scheme = "none"`), all `action = "handler"` because Graph answers carry `@odata.*` annotations and hide the capture-context key column; documented statuses 200/201/202/204/207. `scenarios/default`: 65 synthetic rows. `vendor-openapi.json`: pinned Graph OpenAPI trimmed to the 68 served path items (302 KB) with `2XX`/`204` success keys rewritten to the documented concrete statuses (listed in the sidecar); `connector conform` 98/99, the miss being `DELETE .../incomingChannels/{id}/$ref` which the docs describe but the OpenAPI omits. Not served: user-scoped aliases, `getAllMessages`/delta exports, `$value` binaries, apps/tabs/photo/schedule/permissionGrants. `subset`: no sandbox round trip or goldens. |
|
|
76
76
|
| google-drive | discovery-derived, wave 2 | base; derived from the pinned Drive v3 Discovery document (revision 20260904, sha256 `6d38b6c8e1d1a45fa1b30744523dc6c400ad612997f8e67d112271b573e4948e`), no vendor OpenAPI exists. 10 entities / 34 `$defs` / 410 recursive fields / 4 tools; `drive_folders` is gone (folders are files by `mimeType`). All ten documented resources are entities (Drive, File, Permission, Revision, Comment, Reply, Label, App, AccessProposal, Approval); 49 of 64 documented methods are served from `connector.toml` (changes, channels, about, export/download, CSE tokens, operations and the deprecated `teamdrives.*` are not). Child rows carry route-context `fileId`/`commentId` keys; `parents` stays the vendor array and is not a relationship. Enums are the vendor's declared arrays plus the value lists its descriptions state, recorded separately in `provenance.json`. `vendor-openapi.json` is generated from the Discovery document and trimmed to the served operations; `connector conform` 49/49 against it after seeding `scenarios/default`. `subset`: prose-enum completeness and list-envelope constants unverified, no test-domain round trip or goldens. |
|
|
@@ -80,7 +80,7 @@ real row; captured exports from that tenant become the goldens.
|
|
|
80
80
|
| custom | hand-authored, worked example | the blank starting point for any arbitrary connector, now a worked example of the authoring contract with no vendor behind it: 1 entity (`records`, the only name the scaffold test allows) / 15 fields / 3 tools, showing a primary key, a sparse unique key (`slug`), a self-relationship (`parent_id -> records`, restrict), an enum in `$defs` (`status`), optional (`owner_email`) vs optional-nullable (`parent_id`, `priority`, `due_at`) vs required-nullable (`source.external_id`), a closed nested object and an open bag. Only the original five fields (`id`, `kind`, `name`, `attributes`, `updated_at`) are required and `kind` stays an open string: the SDK test suite uses this template as its blank fixture and inserts rows of that shape, so the example grows by optional fields only. No `connector.toml` ships: the redaction tests need a policy-free world and the same tests create `connector.toml`, `api/` and `scenarios/` themselves and read back an exact template file set, so the template also ships no `api/handlers.py`, no `scenarios/default` seed and no `vendor-openapi.json` (conformance not applicable). Everything is synthetic; `schema init --connector custom` renames the world and drops the tools unless `--with-example-tool`. |
|
|
81
81
|
| workday | hand-authored, wave 3 + REST expansion | tenant-shaped skeleton from pinned public WWS v46.2 WSDL/XSD files (Human Resources, Staffing, Absence Management, Compensation) plus five pinned public Workday REST Swagger 2.0 documents (common v1, staffing v7, absenceManagement v5, compensation v3, person v4, dated 2026-09-12): 27 entities (7 `workday_*` WWS + 20 `workday_rest_*`) / 729 recursive fields / 14 relationships / 3 tools. `connector.toml` serves 62 of the 332 documented REST operations (OAuth2, offset/limit `data[]` envelope, PII redaction, six handler-backed workflow routes); unmodelled routes are listed in `provenance.json`. `scenarios/default` seeds synthetic rows for every entity; `vendor-openapi.json` (OAS 3.0.3 converted and trimmed from the Swagger sources) conforms 62/62. **Describe-on-bind is required** for an actual tenant (tenant WSDL, REST host and OAuth client, custom objects/fields, RaaS). WWS and REST identifier systems stay separate entities until a tenant overlay maps them. Workday-namespaced `wd:enumeration` blocks are used only where the selected reference-ID types declare them; tenant business values remain open. `xsd:date` maps to `format: date`; `xsd:time` remains unformatted because the source permits a missing timezone. `subset`: no tenant round trip, no live capture, timeTracking v6 unreachable. |
|
|
82
82
|
| kandji | hand-authored, wave 3 (expanded 2026-09-15) | base; transcribed from the pinned vendor Postman collection rendered by api-docs.iru.com (135 requests), with the community OpenAPI (`MScottBlake/kandji-openapi@46fa742`) used only as a cross-check. 21 entities / 234 recursive fields / 25 `$defs` / 3 tools; `connector.toml` serves 48 operations (49 of the 135 documented requests: devices, apps, library-item statuses, parameters, commands, activity, notes CRUD, blueprints CRUD + templates + library-item assignment, library-item status/activity, users, tags CRUD, custom apps/profiles/scripts, in-house apps, self-service categories) with 21 handler routes; `scenarios/default` seeds 57 synthetic rows. Device `user` stays as the vendor's nested object-or-empty-string shape; `/user/id` is enforced when assigned and the empty-string sentinel is treated as absent. Nine vendor-declared value blocks (blueprint type, library-item status, activity type, parameter status, integer command status codes, custom-app install type/enforcement, script frequency); platform values are example-derived and completeness remains unverified. Apple-family app shape only; Windows/Android forms need a polymorphic-key model. Trimmed community OpenAPI shipped as `vendor-openapi.json` (18 paths / 26 ops): `connector conform` 16/26 pass; the 10 failures are the community document's inferred types (booleans as integer, arrays as object, nullable `next` as string, blueprint DELETE 200) contradicted by the vendor examples. Not served: device details/Prism, actions, secrets, ADE, threats, vulnerabilities, audit, blueprint routing, upload handshakes. `subset`: no vendor OpenAPI, no account-team sandbox, tenant round trip, or goldens. |
|
|
83
|
-
| jamf | docs-derived, wave 4 | mixed; generated from the OpenAPI 3.0.1 fragments embedded in every pinned developer.jamf.com reference page (Jamf Pro API 11.32.0: 825 pages / 823 operations; Classic API 11.32.0: 689 pages / 613 operations; all fetched 2026-09-15 and hashed in provenance.json) because no per-instance `/api/schema` was available. 66 entities / 166 `$defs` / 2099 recursive fields / 4 tools. Pro resources keep string ids, Classic resources integer ids (root `id` = `general.id`); static and smart groups share one entity per platform; computer and mobile-device group membership are join entities with both foreign keys, prestages and DEP devices point at their device enrollment (7 relationships, all `restrict`); group-name uniqueness is asserted because the create routes document `422 Duplicate group name`, nothing else is. connector.toml serves 302 documented routes (178 Pro under `/api`, 124 Classic under `/JSSResource`; 110 handlers for paged lists, membership and group writes, 90 reads, 25 updates, 77 deletes); the 1134 documented-but-unserved operations are listed per path family in scope.toml `[unserved]`. `vendor-openapi.json` is the two aggregates trimmed to the served routes and their schemas (431 KB; untrimmed hashes in provenance.json) and `connector conform` passes 302/302 after seeding scenarios/default (66 seed files, 198 synthetic rows). Classic list responses follow the pinned array-of-wrapper schema, not the live envelope; Classic XML writes are not
|
|
83
|
+
| jamf | docs-derived, wave 4 | mixed; generated from the OpenAPI 3.0.1 fragments embedded in every pinned developer.jamf.com reference page (Jamf Pro API 11.32.0: 825 pages / 823 operations; Classic API 11.32.0: 689 pages / 613 operations; all fetched 2026-09-15 and hashed in provenance.json) because no per-instance `/api/schema` was available. 66 entities / 166 `$defs` / 2099 recursive fields / 4 tools. Pro resources keep string ids, Classic resources integer ids (root `id` = `general.id`); static and smart groups share one entity per platform; computer and mobile-device group membership are join entities with both foreign keys, prestages and DEP devices point at their device enrollment (7 relationships, all `restrict`); group-name uniqueness is asserted because the create routes document `422 Duplicate group name`, nothing else is. connector.toml serves 302 documented routes (178 Pro under `/api`, 124 Classic under `/JSSResource`; 110 handlers for paged lists, membership and group writes, 90 reads, 25 updates, 77 deletes); the 1134 documented-but-unserved operations are listed per path family in scope.toml `[unserved]`. `vendor-openapi.json` is the two aggregates trimmed to the served routes and their schemas (431 KB; untrimmed hashes in provenance.json) and `connector conform` passes 302/302 after seeding scenarios/default (66 seed files, 198 synthetic rows). Classic list responses follow the pinned array-of-wrapper schema, not the live envelope; Classic XML writes are served only for webhooks (create, update). Sends Jamf's `ComputerAdded` webhook (`[webhooks]`, unsigned) to JSON subscriptions; XML subscriptions and Basic auth are not carried. `subset` until a per-instance schema, a sandbox round trip and goldens exist. |
|
|
84
84
|
| apple-business-manager | docs-derived, wave 3 (full-parity pass) | base; generated from the complete pinned Apple Business API 2.4 DocC JSON corpus (329 pages, per-page sha256 in provenance.json). 24 entities / 281 recursive fields / 28 closed enums / 2 read tools: every documented resource type (OrgDevice, AppleCareCoverage, MdmDevice, MdmDeviceDetail, MdmServer, OrgDeviceActivity, User, UserGroup, OrganizationalUnit, Blueprint, Configuration, App, Package, AuditEvent with all eventData payloads) plus one linkage entity per documented relationship. Vendor `attributes` nesting is preserved; nested `enrolledUserId` and user-group `ouId` relationships are enforced, `roleOuList[].ouId` is not (array traversal); `productFamily` stays open because the shared hr/apple test fixture inserts `MAC`/`IPAD` against Apple's documented `Mac`/`iPad`. `connector.toml` declares all 56 documented routes (OAuth2 client credentials, cursor paging) answered by `api/handlers.py` in Apple's JSON:API envelope with `fields[type]`, `include`, `filter[...]`; `scenarios/default` seeds 69 synthetic rows across every entity. No OpenAPI exists, so `connector conform` is not applicable; the six `DELETE .../relationships/*` routes answer 400 because the world API drops DELETE bodies. `subset`: no sandbox, no live evidence, no goldens. |
|
|
85
85
|
| netsuite | docs-derived, wave 3 (expanded) | tenant-shaped skeleton from the pinned 2026.1 REST API Browser (28 chunks, sha256 in provenance.json; 2023.2 archive as cross-check) plus Oracle record-service, filtering, paging, upsert, error and OAuth docs: 22 standard records as 23 entities / 325 `$defs` / 11,385 recursive fields / 171 relationships / 3 tools / 144 `connector.toml` operations (list, create, get, PATCH, upsert `eid:`, delete per record and 12 modelled-to-modelled `!transform` routes; nsError envelope, `q` filter grammar, `limit`/`offset` paging, bearer required). **Describe-on-bind is required** for role/account-specific records, custom fields, lists, segments, enums, and nullability. Vendor nesting is preserved; `salesOrder-itemElement` is also projected as `netsuite_sales_order_lines` (`order_id`, `line`). Single-target references become restrict relationships; five `one of` references the brief requires (`entity`/`customer` on sales orders, invoices, credit memos, payments; line `item`) are narrowed to customers/items and listed in scope.toml; the other 237 and all collection-item paths stay unenforced. `externalId` uniqueness follows the `eid:` address; the brief's business numbers (`entityId`, `itemId`, `tranId`, `acctNumber`, subsidiary `name`) are declared as the world's contract, not as vendor-schema facts. Default scenario: 97 synthetic rows across all 23 entities. No `vendor-openapi.json`: the Browser is HTML and the OpenAPI 3.0 metadata is per account, so `conform` is not applicable. `suiteql` is not shipped. `subset`: no account metadata overlay, round trip, or goldens. |
|
|
86
86
|
| microsoft-teams | authored schema-only base | [Usage, artifacts, scope, and pinned evidence](../../../documentation/features/microsoft-teams-schema.md); no tools or live integration |
|