@inneranimalmedia/agentsam-sdk 2.0.0 → 2.2.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/README.md +28 -15
- package/docs/CAPABILITIES.md +93 -0
- package/docs/DEPLOY_RECEIPTS.md +83 -0
- package/docs/RECON.md +165 -0
- package/docs/RELEASES.md +4 -3
- package/docs/portable-knowledge.md +4 -4
- package/docs/sdk-2.0-release.md +19 -21
- package/package.json +8 -1
- package/packages/identity/package.json +1 -1
- package/packages/identity/src/frontend/auth-portal/README.md +1 -1
- package/packages/identity/src/index.js +2 -0
- package/protocol/capabilities/capability-manifest.schema.json +36 -0
- package/protocol/capabilities/manifest.json +179 -0
- package/protocol/capabilities/repository-audit-input.schema.json +14 -0
- package/protocol/capabilities/repository-audit.schema.json +30 -0
- package/protocol/capabilities/repository-snapshot-input.schema.json +11 -0
- package/protocol/capabilities/repository-snapshot.schema.json +20 -0
- package/protocol/knowledge/chunk.schema.json +15 -73
- package/protocol/knowledge/document.schema.json +10 -48
- package/protocol/knowledge/index-config.schema.json +2 -2
- package/protocol/knowledge/repository.schema.json +11 -52
- package/protocol/knowledge/retrieval-query.schema.json +13 -63
- package/protocol/knowledge/source.schema.json +9 -43
- package/protocol/presets/catalog.json +48 -0
- package/protocol/recon/README.md +19 -0
- package/protocol/recon/finding-report.schema.json +46 -0
- package/protocol/recon/task-packet.schema.json +79 -0
- package/python/agentsam_sdk/knowledge/models.py +19 -7
- package/python/agentsam_sdk/repository/__main__.py +2 -2
- package/python/agentsam_sdk/repository/recon/__init__.py +28 -0
- package/python/agentsam_sdk/repository/recon/__main__.py +3 -0
- package/python/agentsam_sdk/repository/recon/cli.py +178 -0
- package/python/agentsam_sdk/repository/recon/packet.py +294 -0
- package/python/agentsam_sdk/repository/recon/validate.py +76 -0
- package/python/tests/test_knowledge_models.py +6 -2
- package/python/tests/test_recon.py +257 -0
- package/src/agent/capability-adapter.js +50 -0
- package/src/agent/index.js +2 -0
- package/src/agent/repository-audit.js +188 -0
- package/src/capabilities/index.js +7 -0
- package/src/capabilities/manifest.js +22 -0
- package/src/capabilities/repository-snapshot.js +180 -0
- package/src/cli.js +68 -8
- package/src/commands/deploy-receipt.js +129 -0
- package/src/commands/deploy.js +0 -1
- package/src/commands/knowledge.js +5 -6
- package/src/commands/product.js +119 -0
- package/src/commands/recon.js +71 -0
- package/src/index.js +17 -0
- package/src/knowledge/config.js +12 -6
- package/src/knowledge/contracts.js +1 -1
- package/src/knowledge/engine.js +1 -1
- package/src/knowledge/service/server.js +2 -2
- package/src/lib/deploy-receipt/index.js +246 -0
- package/src/lib/git-context.js +3 -1
- package/src/presets/index.js +20 -0
- package/src/repository/index.js +4 -0
- package/test/agent-capabilities.test.mjs +67 -0
- package/test/capabilities.test.mjs +84 -0
- package/test/deploy-receipt.test.mjs +91 -0
- package/test/portable-context.test.mjs +11 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/manifest.schema.json",
|
|
4
|
+
"title": "AgentSam capability manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "package", "capabilities"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"package": { "type": "string", "minLength": 1 },
|
|
11
|
+
"capabilities": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["id", "kind", "version", "domain", "runtime", "description", "deterministic", "model_required", "side_effects", "status"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9.-]+$" },
|
|
18
|
+
"kind": { "enum": ["capability", "agent_primitive"] },
|
|
19
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
20
|
+
"domain": { "type": "string", "minLength": 1 },
|
|
21
|
+
"runtime": { "type": "string", "minLength": 1 },
|
|
22
|
+
"package": { "type": "string" },
|
|
23
|
+
"export": { "type": "string" },
|
|
24
|
+
"cli": { "type": "string" },
|
|
25
|
+
"description": { "type": "string", "minLength": 1 },
|
|
26
|
+
"deterministic": { "type": "boolean" },
|
|
27
|
+
"model_required": { "type": "boolean" },
|
|
28
|
+
"side_effects": { "type": "string" },
|
|
29
|
+
"input_schema": { "type": "string" },
|
|
30
|
+
"output_schema": { "type": "string" },
|
|
31
|
+
"status": { "enum": ["stable", "experimental", "deprecated"] }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"package": "@inneranimalmedia/agentsam-sdk",
|
|
4
|
+
"capabilities": {
|
|
5
|
+
"repository.snapshot": {
|
|
6
|
+
"id": "repository.snapshot",
|
|
7
|
+
"kind": "capability",
|
|
8
|
+
"version": 1,
|
|
9
|
+
"domain": "repository",
|
|
10
|
+
"runtime": "node+python",
|
|
11
|
+
"package": "@inneranimalmedia/agentsam-sdk/repository",
|
|
12
|
+
"export": "repositorySnapshot",
|
|
13
|
+
"cli": "agentsam inspect --json",
|
|
14
|
+
"description": "Collect a read-only, content-addressed repository evidence snapshot.",
|
|
15
|
+
"deterministic": true,
|
|
16
|
+
"model_required": false,
|
|
17
|
+
"side_effects": "none",
|
|
18
|
+
"input_schema": "protocol/capabilities/repository-snapshot-input.schema.json",
|
|
19
|
+
"output_schema": "protocol/capabilities/repository-snapshot.schema.json",
|
|
20
|
+
"status": "stable"
|
|
21
|
+
},
|
|
22
|
+
"repository.audit": {
|
|
23
|
+
"id": "repository.audit",
|
|
24
|
+
"kind": "agent_primitive",
|
|
25
|
+
"version": 1,
|
|
26
|
+
"domain": "repository",
|
|
27
|
+
"runtime": "node",
|
|
28
|
+
"package": "@inneranimalmedia/agentsam-sdk/agent",
|
|
29
|
+
"export": "runRepositoryAudit",
|
|
30
|
+
"description": "Analyze a certified repository snapshot through an injected reasoning adapter without granting mutation authority.",
|
|
31
|
+
"deterministic": false,
|
|
32
|
+
"model_required": true,
|
|
33
|
+
"side_effects": "none",
|
|
34
|
+
"input_schema": "protocol/capabilities/repository-audit-input.schema.json",
|
|
35
|
+
"output_schema": "protocol/capabilities/repository-audit.schema.json",
|
|
36
|
+
"status": "stable"
|
|
37
|
+
},
|
|
38
|
+
"repository.intelligence": {
|
|
39
|
+
"id": "repository.intelligence",
|
|
40
|
+
"kind": "capability",
|
|
41
|
+
"version": 1,
|
|
42
|
+
"domain": "repository",
|
|
43
|
+
"runtime": "python",
|
|
44
|
+
"package": "@inneranimalmedia/agentsam-sdk/repository",
|
|
45
|
+
"cli": "agentsam repo snapshot",
|
|
46
|
+
"description": "Observe repository composition, manifests, churn, pressure, and stability.",
|
|
47
|
+
"deterministic": true,
|
|
48
|
+
"model_required": false,
|
|
49
|
+
"side_effects": "none",
|
|
50
|
+
"status": "stable"
|
|
51
|
+
},
|
|
52
|
+
"knowledge.index": {
|
|
53
|
+
"id": "knowledge.index",
|
|
54
|
+
"kind": "capability",
|
|
55
|
+
"version": 1,
|
|
56
|
+
"domain": "repository",
|
|
57
|
+
"runtime": "node",
|
|
58
|
+
"package": "@inneranimalmedia/agentsam-sdk/knowledge",
|
|
59
|
+
"cli": "agentsam index run",
|
|
60
|
+
"description": "Build a coherent incremental AST/text generation with optional embeddings.",
|
|
61
|
+
"deterministic": true,
|
|
62
|
+
"model_required": false,
|
|
63
|
+
"side_effects": "local-state",
|
|
64
|
+
"status": "stable"
|
|
65
|
+
},
|
|
66
|
+
"knowledge.search": {
|
|
67
|
+
"id": "knowledge.search",
|
|
68
|
+
"kind": "capability",
|
|
69
|
+
"version": 1,
|
|
70
|
+
"domain": "repository",
|
|
71
|
+
"runtime": "node",
|
|
72
|
+
"package": "@inneranimalmedia/agentsam-sdk/knowledge",
|
|
73
|
+
"cli": "agentsam search \"query\"",
|
|
74
|
+
"description": "Retrieve bounded repository context from a published knowledge generation.",
|
|
75
|
+
"deterministic": true,
|
|
76
|
+
"model_required": false,
|
|
77
|
+
"side_effects": "none",
|
|
78
|
+
"status": "stable"
|
|
79
|
+
},
|
|
80
|
+
"merkle.snapshot": {
|
|
81
|
+
"id": "merkle.snapshot",
|
|
82
|
+
"kind": "capability",
|
|
83
|
+
"version": 1,
|
|
84
|
+
"domain": "integrity",
|
|
85
|
+
"runtime": "node",
|
|
86
|
+
"package": "@inneranimalmedia/agentsam-sdk/merkle",
|
|
87
|
+
"cli": "agentsam merkle snapshot",
|
|
88
|
+
"description": "Create a portable SHA-256 filesystem snapshot.",
|
|
89
|
+
"deterministic": true,
|
|
90
|
+
"model_required": false,
|
|
91
|
+
"side_effects": "local-state",
|
|
92
|
+
"status": "stable"
|
|
93
|
+
},
|
|
94
|
+
"deploy.receipt": {
|
|
95
|
+
"id": "deploy.receipt",
|
|
96
|
+
"kind": "capability",
|
|
97
|
+
"version": 1,
|
|
98
|
+
"domain": "delivery",
|
|
99
|
+
"runtime": "node",
|
|
100
|
+
"package": "@inneranimalmedia/agentsam-sdk/deploy-receipt",
|
|
101
|
+
"cli": "agentsam deploy-receipt capture",
|
|
102
|
+
"description": "Capture and finalize content-addressed deployment evidence.",
|
|
103
|
+
"deterministic": true,
|
|
104
|
+
"model_required": false,
|
|
105
|
+
"side_effects": "local-state",
|
|
106
|
+
"status": "stable"
|
|
107
|
+
},
|
|
108
|
+
"security.scan": {
|
|
109
|
+
"id": "security.scan",
|
|
110
|
+
"kind": "capability",
|
|
111
|
+
"version": 1,
|
|
112
|
+
"domain": "security",
|
|
113
|
+
"runtime": "node",
|
|
114
|
+
"package": "@inneranimalmedia/agentsam-sdk/security",
|
|
115
|
+
"cli": "agentsam security scan",
|
|
116
|
+
"description": "Inventory dependency state and optionally query vulnerability evidence.",
|
|
117
|
+
"deterministic": true,
|
|
118
|
+
"model_required": false,
|
|
119
|
+
"side_effects": "network-optional",
|
|
120
|
+
"status": "stable"
|
|
121
|
+
},
|
|
122
|
+
"identity.init": {
|
|
123
|
+
"id": "identity.init",
|
|
124
|
+
"kind": "capability",
|
|
125
|
+
"version": 1,
|
|
126
|
+
"domain": "app",
|
|
127
|
+
"runtime": "node",
|
|
128
|
+
"package": "@inneranimalmedia/agentsam-sdk/identity",
|
|
129
|
+
"cli": "agentsam identity init",
|
|
130
|
+
"description": "Generate portable identity/auth application surfaces from SDK contracts.",
|
|
131
|
+
"deterministic": true,
|
|
132
|
+
"model_required": false,
|
|
133
|
+
"side_effects": "filesystem",
|
|
134
|
+
"status": "stable"
|
|
135
|
+
},
|
|
136
|
+
"scaffold.create": {
|
|
137
|
+
"id": "scaffold.create",
|
|
138
|
+
"kind": "capability",
|
|
139
|
+
"version": 1,
|
|
140
|
+
"domain": "app",
|
|
141
|
+
"runtime": "node",
|
|
142
|
+
"package": "@inneranimalmedia/agentsam-sdk",
|
|
143
|
+
"cli": "agentsam create <name> --preset <preset>",
|
|
144
|
+
"description": "Create a local-first project from a deterministic preset selection.",
|
|
145
|
+
"deterministic": true,
|
|
146
|
+
"model_required": false,
|
|
147
|
+
"side_effects": "filesystem",
|
|
148
|
+
"status": "stable"
|
|
149
|
+
},
|
|
150
|
+
"recon.pack": {
|
|
151
|
+
"id": "recon.pack",
|
|
152
|
+
"kind": "capability",
|
|
153
|
+
"version": 1,
|
|
154
|
+
"domain": "agent",
|
|
155
|
+
"runtime": "node+python",
|
|
156
|
+
"package": "@inneranimalmedia/agentsam-sdk/repository",
|
|
157
|
+
"cli": "agentsam recon pack",
|
|
158
|
+
"description": "Convert explicit evidence slices into bounded worker task packets.",
|
|
159
|
+
"deterministic": true,
|
|
160
|
+
"model_required": false,
|
|
161
|
+
"side_effects": "none",
|
|
162
|
+
"status": "stable"
|
|
163
|
+
},
|
|
164
|
+
"site.scrape": {
|
|
165
|
+
"id": "site.scrape",
|
|
166
|
+
"kind": "capability",
|
|
167
|
+
"version": 1,
|
|
168
|
+
"domain": "web",
|
|
169
|
+
"runtime": "python",
|
|
170
|
+
"package": "agentsam-site-scrape",
|
|
171
|
+
"cli": "python -m agentsam_site_scrape",
|
|
172
|
+
"description": "Crawl a bounded public site and prepare page/image assets for local or R2 ingest.",
|
|
173
|
+
"deterministic": true,
|
|
174
|
+
"model_required": false,
|
|
175
|
+
"side_effects": "network+filesystem",
|
|
176
|
+
"status": "stable"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/repository-audit-input.schema.json",
|
|
4
|
+
"title": "repository.audit input",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"snapshot": { "type": "object" },
|
|
9
|
+
"focus": { "type": "array", "maxItems": 24, "items": { "type": "string" } },
|
|
10
|
+
"depth": { "enum": ["quick", "standard", "deep"], "default": "standard" },
|
|
11
|
+
"requestedSections": { "type": "array", "maxItems": 24, "items": { "type": "string" } },
|
|
12
|
+
"evidenceBudget": { "type": "integer", "minimum": 1000, "maximum": 64000, "default": 8000 }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/repository-audit.schema.json",
|
|
4
|
+
"title": "repository.audit result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "primitive", "snapshot_id", "snapshot_content_hash", "generated_at", "summary", "packages", "binaries", "commands", "capabilities", "services", "protocols", "notable_combinations", "findings", "cleanup_candidates", "recommended_routes", "evidence_refs", "artifacts"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"primitive": { "const": "repository.audit" },
|
|
11
|
+
"snapshot_id": { "type": "string" },
|
|
12
|
+
"snapshot_content_hash": { "type": "string" },
|
|
13
|
+
"generated_at": { "type": "string" },
|
|
14
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
15
|
+
"repository_map": {},
|
|
16
|
+
"file_tree": {},
|
|
17
|
+
"packages": { "type": "array" },
|
|
18
|
+
"binaries": { "type": "array" },
|
|
19
|
+
"commands": { "type": "array" },
|
|
20
|
+
"capabilities": { "type": "array" },
|
|
21
|
+
"services": { "type": "array" },
|
|
22
|
+
"protocols": { "type": "array" },
|
|
23
|
+
"notable_combinations": { "type": "array" },
|
|
24
|
+
"findings": { "type": "array" },
|
|
25
|
+
"cleanup_candidates": { "type": "array" },
|
|
26
|
+
"recommended_routes": { "type": "array" },
|
|
27
|
+
"evidence_refs": { "type": "array", "items": { "type": "string" } },
|
|
28
|
+
"artifacts": { "type": "array" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/repository-snapshot-input.schema.json",
|
|
4
|
+
"title": "repository.snapshot input",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"cwd": { "type": "string", "minLength": 1 },
|
|
9
|
+
"churnDays": { "type": "integer", "minimum": 1, "maximum": 3650, "default": 30 }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.inneranimalmedia.com/agentsam/capabilities/repository-snapshot.schema.json",
|
|
4
|
+
"title": "repository.snapshot result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema_version", "capability", "snapshot_id", "created_at", "content_hash", "repository", "tree", "intelligence", "packages", "knowledge"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema_version": { "const": 1 },
|
|
9
|
+
"capability": { "const": "repository.snapshot" },
|
|
10
|
+
"snapshot_id": { "type": "string", "pattern": "^rsnap_[a-f0-9]{24}$" },
|
|
11
|
+
"created_at": { "type": "string" },
|
|
12
|
+
"content_hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
|
|
13
|
+
"repository": { "type": "object" },
|
|
14
|
+
"tree": { "type": "object" },
|
|
15
|
+
"intelligence": { "type": "object" },
|
|
16
|
+
"packages": { "type": "array", "items": { "type": "object" } },
|
|
17
|
+
"knowledge": { "type": "object" },
|
|
18
|
+
"deploy": { "type": ["object", "null"] }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -4,79 +4,21 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"title": "Chunk",
|
|
7
|
-
"required": [
|
|
8
|
-
"chunk_id",
|
|
9
|
-
"document_id",
|
|
10
|
-
"workspace_id",
|
|
11
|
-
"content",
|
|
12
|
-
"ordinal",
|
|
13
|
-
"content_hash"
|
|
14
|
-
],
|
|
7
|
+
"required": ["chunk_id", "document_id", "content", "ordinal", "content_hash"],
|
|
15
8
|
"properties": {
|
|
16
|
-
"chunk_id": {
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"minimum": 0
|
|
31
|
-
},
|
|
32
|
-
"content_hash": {
|
|
33
|
-
"type": "string"
|
|
34
|
-
},
|
|
35
|
-
"token_count": {
|
|
36
|
-
"type": [
|
|
37
|
-
"integer",
|
|
38
|
-
"null"
|
|
39
|
-
],
|
|
40
|
-
"minimum": 0
|
|
41
|
-
},
|
|
42
|
-
"repository_full_name": {
|
|
43
|
-
"type": [
|
|
44
|
-
"string",
|
|
45
|
-
"null"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"ref": {
|
|
49
|
-
"type": [
|
|
50
|
-
"string",
|
|
51
|
-
"null"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"commit_sha": {
|
|
55
|
-
"type": [
|
|
56
|
-
"string",
|
|
57
|
-
"null"
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"path": {
|
|
61
|
-
"type": [
|
|
62
|
-
"string",
|
|
63
|
-
"null"
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
"symbol": {
|
|
67
|
-
"type": [
|
|
68
|
-
"string",
|
|
69
|
-
"null"
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
"heading_path": {
|
|
73
|
-
"type": "array",
|
|
74
|
-
"items": {
|
|
75
|
-
"type": "string"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"metadata": {
|
|
79
|
-
"type": "object"
|
|
80
|
-
}
|
|
9
|
+
"chunk_id": { "type": "string" },
|
|
10
|
+
"document_id": { "type": "string" },
|
|
11
|
+
"workspace_id": { "type": "string", "deprecated": true, "description": "Legacy compatibility metadata only." },
|
|
12
|
+
"content": { "type": "string" },
|
|
13
|
+
"ordinal": { "type": "integer", "minimum": 0 },
|
|
14
|
+
"content_hash": { "type": "string" },
|
|
15
|
+
"token_count": { "type": ["integer", "null"], "minimum": 0 },
|
|
16
|
+
"repository_full_name": { "type": ["string", "null"] },
|
|
17
|
+
"ref": { "type": ["string", "null"] },
|
|
18
|
+
"commit_sha": { "type": ["string", "null"] },
|
|
19
|
+
"path": { "type": ["string", "null"] },
|
|
20
|
+
"symbol": { "type": ["string", "null"] },
|
|
21
|
+
"heading_path": { "type": "array", "items": { "type": "string" } },
|
|
22
|
+
"metadata": { "type": "object" }
|
|
81
23
|
}
|
|
82
24
|
}
|
|
@@ -4,54 +4,16 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"title": "Document",
|
|
7
|
-
"required": [
|
|
8
|
-
"document_id",
|
|
9
|
-
"source_id",
|
|
10
|
-
"workspace_id",
|
|
11
|
-
"content_hash",
|
|
12
|
-
"media_type"
|
|
13
|
-
],
|
|
7
|
+
"required": ["document_id", "source_id", "content_hash", "media_type"],
|
|
14
8
|
"properties": {
|
|
15
|
-
"document_id": {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
"
|
|
24
|
-
"type": "string",
|
|
25
|
-
"minLength": 1
|
|
26
|
-
},
|
|
27
|
-
"content_hash": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"minLength": 1
|
|
30
|
-
},
|
|
31
|
-
"media_type": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"minLength": 1
|
|
34
|
-
},
|
|
35
|
-
"title": {
|
|
36
|
-
"type": [
|
|
37
|
-
"string",
|
|
38
|
-
"null"
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
"path": {
|
|
42
|
-
"type": [
|
|
43
|
-
"string",
|
|
44
|
-
"null"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
"text": {
|
|
48
|
-
"type": [
|
|
49
|
-
"string",
|
|
50
|
-
"null"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
"metadata": {
|
|
54
|
-
"type": "object"
|
|
55
|
-
}
|
|
9
|
+
"document_id": { "type": "string", "minLength": 1 },
|
|
10
|
+
"source_id": { "type": "string", "minLength": 1 },
|
|
11
|
+
"workspace_id": { "type": "string", "minLength": 1, "deprecated": true, "description": "Legacy compatibility metadata only." },
|
|
12
|
+
"content_hash": { "type": "string", "minLength": 1 },
|
|
13
|
+
"media_type": { "type": "string", "minLength": 1 },
|
|
14
|
+
"title": { "type": ["string", "null"] },
|
|
15
|
+
"path": { "type": ["string", "null"] },
|
|
16
|
+
"text": { "type": ["string", "null"] },
|
|
17
|
+
"metadata": { "type": "object" }
|
|
56
18
|
}
|
|
57
19
|
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"title": "Portable index configuration v1",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": ["version", "repository_id", "
|
|
7
|
+
"required": ["version", "repository_id", "scope", "chunking", "embedding", "storage"],
|
|
8
8
|
"properties": {
|
|
9
9
|
"version": { "const": 1 },
|
|
10
10
|
"repository_id": { "type": "string", "minLength": 1 },
|
|
11
|
-
"workspace_id": { "type": "string", "minLength": 1 },
|
|
11
|
+
"workspace_id": { "type": "string", "minLength": 1, "deprecated": true, "description": "Legacy compatibility metadata. New portable configs are repository-scoped and must not require this field." },
|
|
12
12
|
"scope": {
|
|
13
13
|
"type": "object", "additionalProperties": false, "required": ["name", "include"],
|
|
14
14
|
"properties": {
|
|
@@ -4,58 +4,17 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"title": "RepositoryDescriptor",
|
|
7
|
-
"required": [
|
|
8
|
-
"repository_id",
|
|
9
|
-
"full_name",
|
|
10
|
-
"workspace_id",
|
|
11
|
-
"default_branch"
|
|
12
|
-
],
|
|
7
|
+
"required": ["repository_id", "full_name", "default_branch"],
|
|
13
8
|
"properties": {
|
|
14
|
-
"repository_id": {
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
"default_branch": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
"product_ids": {
|
|
28
|
-
"type": "array",
|
|
29
|
-
"items": {
|
|
30
|
-
"type": "string"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"indexed_refs": {
|
|
34
|
-
"type": "array",
|
|
35
|
-
"items": {
|
|
36
|
-
"type": "string"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"enabled_lanes": {
|
|
40
|
-
"type": "array",
|
|
41
|
-
"items": {
|
|
42
|
-
"type": "string"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"include": {
|
|
46
|
-
"type": "array",
|
|
47
|
-
"items": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"exclude": {
|
|
52
|
-
"type": "array",
|
|
53
|
-
"items": {
|
|
54
|
-
"type": "string"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"metadata": {
|
|
58
|
-
"type": "object"
|
|
59
|
-
}
|
|
9
|
+
"repository_id": { "type": "string" },
|
|
10
|
+
"full_name": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
|
|
11
|
+
"workspace_id": { "type": "string", "deprecated": true, "description": "Legacy compatibility metadata only." },
|
|
12
|
+
"default_branch": { "type": "string" },
|
|
13
|
+
"product_ids": { "type": "array", "items": { "type": "string" } },
|
|
14
|
+
"indexed_refs": { "type": "array", "items": { "type": "string" } },
|
|
15
|
+
"enabled_lanes": { "type": "array", "items": { "type": "string" } },
|
|
16
|
+
"include": { "type": "array", "items": { "type": "string" } },
|
|
17
|
+
"exclude": { "type": "array", "items": { "type": "string" } },
|
|
18
|
+
"metadata": { "type": "object" }
|
|
60
19
|
}
|
|
61
20
|
}
|
|
@@ -4,69 +4,19 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"additionalProperties": false,
|
|
6
6
|
"title": "RetrievalQuery",
|
|
7
|
-
"required": [
|
|
8
|
-
"text",
|
|
9
|
-
"workspace_id"
|
|
10
|
-
],
|
|
7
|
+
"required": ["text"],
|
|
11
8
|
"properties": {
|
|
12
|
-
"text": {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"product_ids": {
|
|
27
|
-
"type": "array",
|
|
28
|
-
"items": {
|
|
29
|
-
"type": "string"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"refs": {
|
|
33
|
-
"type": "array",
|
|
34
|
-
"items": {
|
|
35
|
-
"type": "string"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"intent": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"default": "auto"
|
|
41
|
-
},
|
|
42
|
-
"lanes": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"items": {
|
|
45
|
-
"type": "string"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"top_k": {
|
|
49
|
-
"type": "integer",
|
|
50
|
-
"minimum": 1,
|
|
51
|
-
"maximum": 100,
|
|
52
|
-
"default": 12
|
|
53
|
-
},
|
|
54
|
-
"token_budget": {
|
|
55
|
-
"type": "integer",
|
|
56
|
-
"minimum": 256,
|
|
57
|
-
"default": 8000
|
|
58
|
-
},
|
|
59
|
-
"require_current_ref": {
|
|
60
|
-
"type": "boolean",
|
|
61
|
-
"default": true
|
|
62
|
-
},
|
|
63
|
-
"include_archived": {
|
|
64
|
-
"type": "boolean",
|
|
65
|
-
"default": false
|
|
66
|
-
},
|
|
67
|
-
"explain": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"default": true
|
|
70
|
-
}
|
|
9
|
+
"text": { "type": "string", "minLength": 1 },
|
|
10
|
+
"workspace_id": { "type": "string", "minLength": 1, "deprecated": true, "description": "Legacy compatibility metadata only; repository selection is explicit through repository identity." },
|
|
11
|
+
"repositories": { "type": "array", "items": { "type": "string" } },
|
|
12
|
+
"product_ids": { "type": "array", "items": { "type": "string" } },
|
|
13
|
+
"refs": { "type": "array", "items": { "type": "string" } },
|
|
14
|
+
"intent": { "type": "string", "default": "auto" },
|
|
15
|
+
"lanes": { "type": "array", "items": { "type": "string" } },
|
|
16
|
+
"top_k": { "type": "integer", "minimum": 1, "maximum": 100, "default": 12 },
|
|
17
|
+
"token_budget": { "type": "integer", "minimum": 256, "default": 8000 },
|
|
18
|
+
"require_current_ref": { "type": "boolean", "default": true },
|
|
19
|
+
"include_archived": { "type": "boolean", "default": false },
|
|
20
|
+
"explain": { "type": "boolean", "default": true }
|
|
71
21
|
}
|
|
72
22
|
}
|