DeepStack API v2 contracts, package 1be436ac1a7c (CC-BY-4.0), new version over 1e3bc19d329b
Browse filesFiles changed (7)
18 unmodified lines19202122232425262718 unmodified lines`/v2/trackrecord`) and valid examples of each. `/v2` serves the same contracts as `/v1`: a GroundedAnswer is aGroundedAnswer, whoever asks.- **Items:** 34 files (12 schemas, 22 examples), listed in `manifest.json` with sha256, size,licence, source and rights per item.- **Package id:** `7726f3ef2d6c89a351740d8ea2a96ce1dffe6b3c1a0e6e868895457fd4415d64` (sha256 of the canonical list of item paths and hashes).- **Excluded:** 33 candidate files, each with its reason in `manifest.json` (negative fixtures are notexamples; nothing that cites another source, names a model provider or names an open question is distributed).- **What it is not:** no reader data, no forecast of an open question, no passage of a paid or third-party source, no18 unmodified lines19202122232425262718 unmodified lines`/v2/trackrecord`) and valid examples of each. `/v2` serves the same contracts as `/v1`: a GroundedAnswer is aGroundedAnswer, whoever asks.- **Items:** 35 files (12 schemas, 23 examples), listed in `manifest.json` with sha256, size,licence, source and rights per item.- **Package id:** `1be436ac1a7c92861d710a9a25791aac329493fa2aad2cdff98fbd194335cc66` (sha256 of the canonical list of item paths and hashes).- **Excluded:** 33 candidate files, each with its reason in `manifest.json` (negative fixtures are notexamples; nothing that cites another source, names a model provider or names an open question is distributed).- **What it is not:** no reader data, no forecast of an open question, no passage of a paid or third-party source, no
1 unmodified line2345671 unmodified line"schema_version": "ml.v1","key_id": "key_0123456789abcdef","tenant_id": "tenant:deepstack-internal","label": "dogfood mcp v2","scopes": ["answers:analyst",1 unmodified line23456781 unmodified line"schema_version": "ml.v1","key_id": "key_0123456789abcdef","tenant_id": "tenant:deepstack-internal","workspace_id": null,"label": "dogfood mcp v2","scopes": ["answers:analyst",
1 unmodified line2345671 unmodified line"schema_version": "ml.v1","key_id": "key_fedcba9876543210","tenant_id": "tenant:deepstack-internal","label": "dogfood mcp v2","scopes": ["answers:analyst",1 unmodified line23456781 unmodified line"schema_version": "ml.v1","key_id": "key_fedcba9876543210","tenant_id": "tenant:deepstack-internal","workspace_id": null,"label": "dogfood mcp v2","scopes": ["answers:analyst",
1234567891011121314151617181920212223242526272829303132333435363738{ "schema_version": "ml.v1", "key_id": "key_1111222233334444", "tenant_id": "tenant:deepstack-internal", "workspace_id": "ws_0123456789abcdef0123", "label": "FIXTURE desk key", "scopes": [ "workspace:export.process", "workspace:read" ], "rights": { "policy_version": "policy-r0", "purposes": [ "read", "process" ] }, "quota": { "per_minute": 30, "per_day": 2000, "concurrency": 2 }, "status": "active", "phase": "pre_lock", "hash": { "algorithm": "pbkdf2-hmac-sha256", "iterations": 20000, "salt": "00000000000000000000000000000000", "digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }, "created_at": "2026-10-29T15:00:00Z", "expires_at": null, "rotated_from": null, "rotated_to": null, "grace_until": null, "revoked_at": null, "revoked_reason": null}3 unmodified lines456789103 unmodified lines"kind": "analyst_completed","cohort": "account","subject_ref": "sp_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","tenant_id": "public","consent": "measurement","occurred_at": "2026-10-29T15:00:00Z","object_id": "th001-t41",3 unmodified lines456789103 unmodified lines"kind": "analyst_completed","cohort": "account","subject_ref": "sp_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","tenant_id": "tenant:deepstack-public","consent": "measurement","occurred_at": "2026-10-29T15:00:00Z","object_id": "th001-t41",
1 unmodified line2345678157 unmodified lines1661671681691701711721737 unmodified lines181182183184185186187188189190140 unmodified lines331332333334335336337338155 unmodified lines494495496497498499500501153 unmodified lines6556566576586596606611 unmodified line"attribution": "DeepStack","card": {"path": "README.md","sha256": "0813beaba40785de7e216fe6ce12a9928b1a6ba9ce36d3090e4d180d9bbe8228","size_bytes": 1809},"excluded": [157 unmodified lines"read"],"schema": "api-key","sha256": "03cd4f9ede606eee418c30b12d1466ffce087e00ed118371121152872abfd3f2","size_bytes": 822,"source": "contracts/ml/fixtures/v1/api-key/valid-dogfood-key.json"},{7 unmodified lines"read"],"schema": "api-key","sha256": "4da696e4f53942b7948545d477cabd77a4782d7d55796ee36407c74a99d39733","size_bytes": 860,"source": "contracts/ml/fixtures/v1/api-key/valid-rotated-in-grace.json"},{"kind": "example","licence": "cc-by-4.0",140 unmodified lines"read"],"schema": "product-event","sha256": "535ba72b3ee7b2653f034b58da50d3fbbaa704a68de6d037384d630533d50856","size_bytes": 363,"source": "contracts/ml/fixtures/v1/product-event/valid-account-measurement.json"},{155 unmodified lines"read"],"schema": "api-key","sha256": "91bf7a7db8c8a751b1534c988c7e9fa37240bfb5eb37a32b8ab88656dba0cc0e","size_bytes": 6871,"source": "contracts/ml/v1/api-key.schema.json"},{153 unmodified lines"size_bytes": 18657},"name": "dataset-api-v2-contracts","package_id": "7726f3ef2d6c89a351740d8ea2a96ce1dffe6b3c1a0e6e868895457fd4415d64","repo": "deepstack-ml/deepstack-api-v2-contracts","schema": "deepstack.distribution.dataset/v1","visibility": "public"1 unmodified line2345678157 unmodified lines1661671681691701711721737 unmodified lines181182183184185186187188189190191192193194195196197198199200201202203204205140 unmodified lines346347348349350351352353155 unmodified lines509510511512513514515516153 unmodified lines6706716726736746756761 unmodified line"attribution": "DeepStack","card": {"path": "README.md","sha256": "de3877753089805b605389f5f4cde1b9bba42935a0069ac929d114843081b0c3","size_bytes": 1809},"excluded": [157 unmodified lines"read"],"schema": "api-key","sha256": "c9da95dd1fcf75f18da4d8ef1e4fd23e033b094f46047d0a77b34a71488a846e","size_bytes": 845,"source": "contracts/ml/fixtures/v1/api-key/valid-dogfood-key.json"},{7 unmodified lines"read"],"schema": "api-key","sha256": "d12c57b987c533fcf9c2c3e0685c2dce172d6a3a8c70c97ee262dd23356a386c","size_bytes": 883,"source": "contracts/ml/fixtures/v1/api-key/valid-rotated-in-grace.json"},{"kind": "example","licence": "cc-by-4.0","note": "R5: chave de workspace emitida pelo TenantStore, presa a um workspace, so scopes workspace:*","path": "examples/api-key/valid-workspace-key.json","rights_purposes": ["process","publish","read"],"schema": "api-key","sha256": "0efe43bd7547f07aeb35e67165e59a2d2de53fc308dea963c5972f40dddc5671","size_bytes": 832,"source": "contracts/ml/fixtures/v1/api-key/valid-workspace-key.json"},{"kind": "example","licence": "cc-by-4.0",140 unmodified lines"read"],"schema": "product-event","sha256": "e5b06b9b8621728794353623bf55ae33473d5995481a1d2cad0e6cfaa07988ab","size_bytes": 380,"source": "contracts/ml/fixtures/v1/product-event/valid-account-measurement.json"},{155 unmodified lines"read"],"schema": "api-key","sha256": "a25a25f7b29abef81f4777b7b24b3be2f50909fca1afd05de2b614bec413312a","size_bytes": 7971,"source": "contracts/ml/v1/api-key.schema.json"},{153 unmodified lines"size_bytes": 18657},"name": "dataset-api-v2-contracts","package_id": "1be436ac1a7c92861d710a9a25791aac329493fa2aad2cdff98fbd194335cc66","repo": "deepstack-ml/deepstack-api-v2-contracts","schema": "deepstack.distribution.dataset/v1","visibility": "public"
1 unmodified line23456789101112131419 unmodified lines34353637383987 unmodified lines1271281291301311321333 unmodified lines1371381391401411421431441451461471481496 unmodified lines15615715815916016116265 unmodified lines22822923023123223314 unmodified lines2482492502512522531 unmodified line"$schema": "https://json-schema.org/draft/2020-12/schema","$id": "api-key.schema.json","title": "ApiKeyRecord","description": "One API key of a tenant as the server stores it (INT-007/APP-10, R4). The secret is never stored: only a salted PBKDF2-HMAC-SHA256 digest, with its own random salt. Scopes are 'route:purpose' pairs from a closed list; a key is never a forecasting machine, never trains, retains or publishes. rights is the ceiling of the rights_scope a request may claim. phase is always pre_lock: a key cannot attest a lock. The public view ($defs/public_view) is what /v2/keys/self answers and has no salt and no digest.","type": "object","additionalProperties": false,"required": ["schema_version","key_id","tenant_id","label","scopes","rights",19 unmodified lines"tenant_id": {"$ref": "#/$defs/tenant_id"},"label": {"$ref": "#/$defs/label"},87 unmodified lines"owner_revoked","rotated","compromised","tenant_closed"]}},3 unmodified lines"pattern": "^key_[0-9a-f]{16}$"},"tenant_id": {"description": "tenant:<slug>. Locally only tenant:deepstack-internal (dogfood) and, in tests, tenant:qa-*.","type": "string","pattern": "^tenant:[a-z0-9][a-z0-9-]{1,62}$"},"label": {"type": "string","pattern": "^[a-z0-9][a-z0-9 ._-]{0,63}$"},"scopes": {"type": "array",6 unmodified lines"answers:resolution_explainer","search:analyst","scenarios:analyst","trackrecord:read"]}},65 unmodified lines"schema_version","key_id","tenant_id","label","scopes","rights",14 unmodified lines"tenant_id": {"$ref": "#/$defs/tenant_id"},"label": {"$ref": "#/$defs/label"},1 unmodified line2345678910111213141519 unmodified lines35363738394041424387 unmodified lines1311321331341351361371383 unmodified lines1421431441451461471481491501511521531541551561571581591601611626 unmodified lines16917017117217317417517617717817965 unmodified lines24524624724824925025114 unmodified lines2662672682692702712722732741 unmodified line"$schema": "https://json-schema.org/draft/2020-12/schema","$id": "api-key.schema.json","title": "ApiKeyRecord","description": "One API key as the server stores it (INT-007/APP-10, R4; R5: the single key system). The secret is never stored: only a salted PBKDF2-HMAC-SHA256 digest, with its own random salt. A key is either a /v2 key (workspace_id null; scopes 'route:purpose' from a closed list) or a workspace key (workspace_id set; workspace:* scopes only), never both. A key is never a forecasting machine, never trains, retains or publishes. rights is the ceiling of the rights a request may claim (and, on /v2/search, the purposes every item must carry). phase is always pre_lock: a key cannot attest a lock. Cross-field rules (semantic.check_api_key): a revoked key has revoked_at and revoked_reason, a live one has neither; expires_at is after created_at; a rotating key names rotated_to and grace_until; workspace scopes exactly when workspace_id. The public view ($defs/public_view) is what /v2/keys/self answers and has no salt and no digest.","type": "object","additionalProperties": false,"required": ["schema_version","key_id","tenant_id","workspace_id","label","scopes","rights",19 unmodified lines"tenant_id": {"$ref": "#/$defs/tenant_id"},"workspace_id": {"$ref": "#/$defs/workspace_id"},"label": {"$ref": "#/$defs/label"},87 unmodified lines"owner_revoked","rotated","compromised","tenant_closed","workspace_archived"]}},3 unmodified lines"pattern": "^key_[0-9a-f]{16}$"},"tenant_id": {"description": "tenant:<slug>. Canonical: tenant:deepstack-public (every reader of the app) and tenant:deepstack-internal; keys exist locally only in tenant:deepstack-internal and, in tests, tenant:qa-*.","type": "string","pattern": "^tenant:[a-z0-9][a-z0-9-]{1,62}$"},"workspace_id": {"description": "The one workspace a workspace key is bound to; null for a /v2 key.","type": ["string","null"],"pattern": "^ws_[0-9A-Za-z]{4,64}$"},"label": {"type": "string","pattern": "^[A-Za-z0-9][A-Za-z0-9 ._-]{0,63}$"},"scopes": {"type": "array",6 unmodified lines"answers:resolution_explainer","search:analyst","scenarios:analyst","trackrecord:read","workspace:read","workspace:collections.read","workspace:notes.read","workspace:export.process"]}},65 unmodified lines"schema_version","key_id","tenant_id","workspace_id","label","scopes","rights",14 unmodified lines"tenant_id": {"$ref": "#/$defs/tenant_id"},"workspace_id": {"$ref": "#/$defs/workspace_id"},"label": {"$ref": "#/$defs/label"},
README.md+2-2
examples/api-key/valid-dogfood-key.json+1
examples/api-key/valid-rotated-in-grace.json+1
examples/api-key/valid-workspace-key.jsonAdded+38
examples/product-event/valid-account-measurement.json+1-1
manifest.json+25-10
schemas/api-key.schema.json+26-5