Уточнить DSH, плагины, roadmap и контракты исполнения

This commit is contained in:
admin committed 2026-11-11 05:24:36 +00:00
1 parent 2af6dd78ba
commit 41a4397ed2
25 files changed
+743 -37

No files matched your search

+13 -5
View File
@@ -11,13 +11,13 @@
| VersionPolicy | versionId, status, reason, revision | Catalog |
| Agent | id, tenantId, ownerId, name, currentRevision | Platform API |
| AgentRevision | id, agentId, revision, templateVersionId, config, connections, schemaDigest | Platform API |
| Connection | id, tenantId, provider, scopes, encryptedSecretRef | Secrets / Platform API |
| Connection | id, tenantId, ownerId, providerId, authMode, placement, status, secretBindingRef | Secrets / Platform API |
| Run | id, tenantId, agentRevisionId, status, specDigest, parentRunId | Platform API |
| Attempt | id, runId, runnerId, leaseEpoch, leaseUntil, status | Dispatcher |
| RunnerPool | id, tenantId, trustPolicy, quotas | Dispatcher |
| Runner | id, poolId, capabilities, credentialStatus, lastSeenAt | Dispatcher |
| Attempt | id, runId, runnerId, leaseEpoch, leaseUntil, status | Dispatcher / Platform DB |
| RunnerPool | id, tenantId, trustPolicy, quotas | Dispatcher / Platform DB |
| Runner | id, poolId, capabilities, credentialStatus, lastSeenAt | Dispatcher / Platform DB |
| Artifact | id, runId, attemptId, objectKey, digest, sizeBytes, mediaType | Platform API |
| Schedule | id, agentId, cron, timezone, nextRunAt, overlapPolicy | Dispatcher |
| Schedule | id, agentId, agentRevisionId, cron, timezone, nextRunAt, overlapPolicy, misfirePolicy | Dispatcher / Platform DB |
| Outbox | id, aggregateId, eventType, payload, deliveredAt | Пишущий сервис |
## Инварианты
@@ -42,3 +42,11 @@
Id — opaque string. Version — SemVer строка; разрешение диапазонов выполняет resolver до фиксации ExecutionSpec. Digest — SHA-256. Timestamps — RFC3339 UTC. UUID не навязывается публичным контрактом.
Package manifest с kind=template обязан указать harnessVersionId, configSchemaRef и зависимости. Harness обязан указать entrypoint и executionKind. Plugin и skill указывают совместимость supportedHarnesses. Отсутствующая optional capability означает, что возможность недоступна; поле не может быть выведено из названия пакета.
Run, Attempt, Schedule и reservations составляют одну транзакционную область Platform DB. Внешние Execution DB и Catalog DB не принимают бизнес-переходы Run. Подробнее: [исполнение](../execution.md).
- [Assignment и AttemptContext](runner-assignment.schema.json): контекст попытки отдельно от неизменяемого spec.
- [ResultManifest](result-manifest.schema.json): результат и проверяемые артефакты.
- [Provider API](../api/provider-api.md): канонический ConnectionSummary; secretBindingRef остаётся серверным полем.
inputSchemaRef и outputSchemaRef обязательны для template. Все schemaRef — пути внутри проверенного архива версии; произвольные сетевые $ref запрещены. DSH-плагин указывает dshCompatibility; статус совместимости выставляется каталогом по отдельному отчёту, а не самим автором.
@@ -0,0 +1,15 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Company input",
"type": "object",
"additionalProperties": false,
"required": [
"company"
],
"properties": {
"company": {
"type": "string",
"minLength": 1
}
}
}
@@ -0,0 +1,15 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Research output",
"type": "object",
"additionalProperties": false,
"required": [
"summary"
],
"properties": {
"summary": {
"type": "string",
"minLength": 1
}
}
}
@@ -23,5 +23,7 @@
"cancel-v1"
],
"requiredPermissions": [],
"retrySafe": false
"retrySafe": false,
"inputSchemaRef": "input.schema.json",
"outputSchemaRef": "output.schema.json"
}
@@ -132,12 +132,6 @@
"type": "string",
"minLength": 1
}
},
"checkpointRef": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"resumeInput": {}
}
}
}
@@ -134,6 +134,45 @@
},
"retrySafe": {
"type": "boolean"
},
"inputSchemaRef": {
"type": "string",
"minLength": 1
},
"outputSchemaRef": {
"type": "string",
"minLength": 1
},
"dshCompatibility": {
"type": "object",
"additionalProperties": false,
"required": [
"dshVersionRange",
"nodeVersionRange",
"entryModule",
"profile"
],
"properties": {
"dshVersionRange": {
"type": "string",
"minLength": 1
},
"nodeVersionRange": {
"type": "string",
"minLength": 1
},
"entryModule": {
"type": "string",
"minLength": 1
},
"profile": {
"enum": [
"headless",
"web",
"both"
]
}
}
}
},
"allOf": [
@@ -148,7 +187,9 @@
"then": {
"required": [
"harnessVersionId",
"configSchemaRef"
"configSchemaRef",
"inputSchemaRef",
"outputSchemaRef"
]
}
},
@@ -0,0 +1,44 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ResultManifest v1",
"type": "object",
"additionalProperties": false,
"required": [
"output",
"artifacts"
],
"properties": {
"output": {},
"artifacts": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"artifactId",
"digest",
"sizeBytes",
"mediaType"
],
"properties": {
"artifactId": {
"type": "string",
"minLength": 1
},
"digest": {
"type": "string",
"pattern": "^sha256:[a-f0-9]{64}$"
},
"sizeBytes": {
"type": "integer",
"minimum": 0
},
"mediaType": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
+152 -1
View File
@@ -42,5 +42,156 @@
"payload": {
"type": "object"
}
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "progress"
}
}
},
"then": {
"properties": {
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"minLength": 1
},
"fraction": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "log"
}
}
},
"then": {
"properties": {
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"level",
"message"
],
"properties": {
"level": {
"enum": [
"debug",
"info",
"warn",
"error"
]
},
"message": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "artifact_ready"
}
}
},
"then": {
"properties": {
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"artifactId"
],
"properties": {
"artifactId": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "input_requested"
}
}
},
"then": {
"properties": {
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"inputRequestId"
],
"properties": {
"inputRequestId": {
"type": "string",
"minLength": 1
}
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "diagnostic"
}
}
},
"then": {
"properties": {
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"minLength": 1
},
"message": {
"type": "string",
"minLength": 1
}
}
}
}
}
}
]
}
@@ -0,0 +1,83 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Runner Assignment v1",
"type": "object",
"additionalProperties": false,
"required": [
"attemptId",
"runId",
"leaseEpoch",
"leaseUntil",
"executionSpec",
"attemptContext",
"executionToken",
"tokenExpiresAt"
],
"properties": {
"attemptId": {
"type": "string",
"minLength": 1
},
"runId": {
"type": "string",
"minLength": 1
},
"leaseEpoch": {
"type": "integer",
"minimum": 1
},
"leaseUntil": {
"type": "string",
"format": "date-time"
},
"executionSpec": {
"$ref": "execution-spec.schema.json"
},
"attemptContext": {
"type": "object",
"additionalProperties": false,
"required": [
"deadlineAt"
],
"properties": {
"deadlineAt": {
"type": "string",
"format": "date-time"
},
"continuation": {
"type": "object",
"additionalProperties": false,
"required": [
"checkpointRef",
"inputRequestId",
"responseId",
"resumeInput"
],
"properties": {
"checkpointRef": {
"type": "string",
"minLength": 1
},
"inputRequestId": {
"type": "string",
"minLength": 1
},
"responseId": {
"type": "string",
"minLength": 1
},
"resumeInput": {}
}
}
}
},
"executionToken": {
"type": "string",
"minLength": 1
},
"tokenExpiresAt": {
"type": "string",
"format": "date-time"
}
}
}