@piagent/platform 1.0.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/.gitattributes +7 -0
- package/AGENTS.md +31 -0
- package/CHANGELOG.md +296 -0
- package/CODE_OF_CONDUCT.md +36 -0
- package/CONTRIBUTING.md +66 -0
- package/LICENSE +21 -0
- package/README.md +588 -0
- package/SECURITY.md +38 -0
- package/adapters/backend-api/profile.json +88 -0
- package/adapters/be-readonly-fe/profile.json +120 -0
- package/adapters/data/profile.json +88 -0
- package/adapters/devops/profile.json +92 -0
- package/adapters/docs/profile.json +74 -0
- package/adapters/fullstack/profile.json +94 -0
- package/adapters/generic/profile.json +95 -0
- package/adapters/mobile/profile.json +87 -0
- package/adapters/node-typescript/profile.json +76 -0
- package/adapters/python/profile.json +75 -0
- package/adapters/web-frontend/profile.json +101 -0
- package/catalog/capabilities.json +206 -0
- package/docs/architecture.md +64 -0
- package/docs/auto-delegation-policy.md +192 -0
- package/docs/capability-packs.md +234 -0
- package/docs/command-reference-vietnamese.md +484 -0
- package/docs/context-window-policy.md +85 -0
- package/docs/distribution-standard.md +229 -0
- package/docs/herdr-workflow.md +58 -0
- package/docs/mcp-and-tools.md +316 -0
- package/docs/memory-policy.md +164 -0
- package/docs/model-options.md +165 -0
- package/docs/oauth-providers.md +53 -0
- package/docs/operator-manual-vietnamese.md +1080 -0
- package/docs/package-architecture-notes.md +101 -0
- package/docs/project-adapters.md +174 -0
- package/docs/project-onboarding.md +135 -0
- package/docs/publishing-for-teams.md +64 -0
- package/docs/quality-benchmark.md +74 -0
- package/docs/quickstart-vietnamese.md +350 -0
- package/docs/release-install-policy.md +223 -0
- package/docs/runtime-harness-standard.md +118 -0
- package/docs/runtime-policy-design.md +132 -0
- package/docs/runtime-quality-baseline.md +257 -0
- package/docs/security-redaction-benchmark.md +56 -0
- package/docs/security-threat-model.md +66 -0
- package/docs/subagent-orchestration-capabilities.md +104 -0
- package/docs/subagents-and-multiagent.md +346 -0
- package/docs/task-implementation-contract.md +200 -0
- package/docs/team-onboarding.md +333 -0
- package/docs/usage-observability.md +130 -0
- package/docs/vercel-docs-site.md +115 -0
- package/docs/workflow-recipes.md +125 -0
- package/docs-site/assets/piagent-logo.svg +35 -0
- package/docs-site/favicon.svg +18 -0
- package/docs-site/index.html +1613 -0
- package/docs-site/vercel.json +24 -0
- package/evals/fixtures/action-proposal.invalid.json +34 -0
- package/evals/fixtures/action-proposal.valid.json +34 -0
- package/evals/fixtures/capability-pack.invalid.json +123 -0
- package/evals/fixtures/capability-pack.valid.json +123 -0
- package/evals/fixtures/capability-recipe.invalid.json +81 -0
- package/evals/fixtures/capability-recipe.valid.json +82 -0
- package/evals/fixtures/context-index.invalid.json +25 -0
- package/evals/fixtures/context-index.valid.json +25 -0
- package/evals/fixtures/eval-scenario.invalid.json +40 -0
- package/evals/fixtures/eval-scenario.valid.json +45 -0
- package/evals/fixtures/project-profile.invalid.json +88 -0
- package/evals/fixtures/project-profile.valid.json +95 -0
- package/evals/fixtures/task-contract.invalid.json +73 -0
- package/evals/fixtures/task-contract.valid.json +74 -0
- package/evals/golden/enforcement-decisions.json +329 -0
- package/evals/scenarios/capability-resolution.json +45 -0
- package/package.json +132 -0
- package/packages/piagent-core/README.md +147 -0
- package/packages/piagent-core/capabilities/capability-core.js +1023 -0
- package/packages/piagent-core/capabilities/capability-sources.js +265 -0
- package/packages/piagent-core/extensions/guard-io.js +45 -0
- package/packages/piagent-core/extensions/guard-shell-analysis.ts +558 -0
- package/packages/piagent-core/extensions/guard-types.ts +406 -0
- package/packages/piagent-core/extensions/piagent-guard.ts +5760 -0
- package/packages/piagent-core/extensions/policy-core.js +1070 -0
- package/packages/piagent-core/extensions/redaction-core.js +4 -0
- package/packages/piagent-core/extensions/runtime-evidence.js +215 -0
- package/packages/piagent-core/package.json +46 -0
- package/packages/piagent-core/policies/base-policy.json +249 -0
- package/packages/piagent-core/prompts/be-to-fe.md +82 -0
- package/packages/piagent-core/prompts/commit.md +27 -0
- package/packages/piagent-core/prompts/discuss.md +35 -0
- package/packages/piagent-core/prompts/memory-policy.md +52 -0
- package/packages/piagent-core/prompts/model-options.md +68 -0
- package/packages/piagent-core/prompts/onboard-project.md +147 -0
- package/packages/piagent-core/prompts/piagent-commands.md +68 -0
- package/packages/piagent-core/prompts/plan.md +35 -0
- package/packages/piagent-core/prompts/platform-improve.md +69 -0
- package/packages/piagent-core/prompts/pr.md +26 -0
- package/packages/piagent-core/prompts/review.md +38 -0
- package/packages/piagent-core/prompts/scout.md +50 -0
- package/packages/piagent-core/prompts/task.md +69 -0
- package/packages/piagent-core/security/sensitive-data.js +187 -0
- package/packages/piagent-core/skills/piagent-ops/SKILL.md +44 -0
- package/packages/piagent-core/skills/piagent-source-cache/SKILL.md +59 -0
- package/packages/piagent-core/skills/piagent-source-cache/checkout-source-repo.sh +144 -0
- package/packages/piagent-core/subagents/piagent-oracle.md +29 -0
- package/packages/piagent-core/subagents/piagent-planner.md +46 -0
- package/packages/piagent-core/subagents/piagent-reviewer.md +48 -0
- package/packages/piagent-core/subagents/piagent-scout.md +37 -0
- package/packages/piagent-core/subagents/piagent-worker.md +44 -0
- package/packs/engineering-base/pack.json +123 -0
- package/packs/engineering-base/recipes/bounded-change.json +82 -0
- package/packs/web-delivery/pack.json +72 -0
- package/packs/web-delivery/recipes/verified-web-change.json +57 -0
- package/schemas/action-proposal.schema.json +90 -0
- package/schemas/capability-pack.schema.json +190 -0
- package/schemas/capability-recipe.schema.json +72 -0
- package/schemas/context-index.schema.json +258 -0
- package/schemas/eval-scenario.schema.json +67 -0
- package/schemas/project-profile.schema.json +555 -0
- package/schemas/task-contract.schema.json +314 -0
- package/scripts/audit-runtime-host.sh +78 -0
- package/scripts/bootstrap-local.sh +25 -0
- package/scripts/capability-catalog.mjs +290 -0
- package/scripts/check-runtime-advisories.mjs +114 -0
- package/scripts/configure-mcp.sh +301 -0
- package/scripts/configure-model-scope.sh +143 -0
- package/scripts/configure-subagents.sh +241 -0
- package/scripts/import-agent-instructions.mjs +199 -0
- package/scripts/init-project.sh +369 -0
- package/scripts/install-global.sh +532 -0
- package/scripts/link-project.sh +25 -0
- package/scripts/migrate-project-state.mjs +176 -0
- package/scripts/pi-auto.sh +79 -0
- package/scripts/pi-model-catalog.sh +154 -0
- package/scripts/pi-session-stats.sh +135 -0
- package/scripts/piagent-cli.mjs +53 -0
- package/scripts/profile-doctor.sh +238 -0
- package/scripts/quality-benchmark.sh +185 -0
- package/scripts/redaction-benchmark.mjs +227 -0
- package/scripts/runtime-policy-smoke.sh +48 -0
- package/scripts/setup.sh +425 -0
- package/scripts/team-doctor.sh +461 -0
- package/scripts/verify-local.sh +540 -0
- package/scripts/verify-release-identity.mjs +85 -0
- package/scripts/verify-vercel-link.mjs +64 -0
- package/templates/global/mcp.json +9 -0
- package/templates/global/settings.json +37 -0
- package/templates/project/.mcp.json +9 -0
- package/templates/project/.pi/context-index.json +25 -0
- package/templates/project/.pi/gitignore.template +22 -0
- package/templates/project/.pi/mcp.json +9 -0
- package/templates/project/.pi/memory/MEMORY.md +11 -0
- package/templates/project/.pi/memory/memory_summary.md +9 -0
- package/templates/project/.pi/piagent-profile.json +107 -0
- package/templates/project/.pi/project-context.md +30 -0
- package/templates/project/.pi/settings.json +17 -0
- package/templates/project/.pi/task-contract.template.json +74 -0
- package/templates/project/.pi/tech-context/README.md +7 -0
- package/templates/project/.pi/tech-stack.json +10 -0
- package/templates/project/AGENTS.md +34 -0
- package/templates/project/REVIEW_GUIDELINES.md +23 -0
- package/types/pi-runtime-shims.d.ts +13 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Vt-mmm/piagent/schemas/context-index.schema.json",
|
|
4
|
+
"title": "Pi Agent Context Index",
|
|
5
|
+
"description": "Compact advisory context graph for profile/project/tech/task navigation. It is not a security boundary or source of truth.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"source",
|
|
11
|
+
"summary",
|
|
12
|
+
"generatedAt",
|
|
13
|
+
"updatedAt",
|
|
14
|
+
"policy",
|
|
15
|
+
"nodes",
|
|
16
|
+
"edges",
|
|
17
|
+
"citations",
|
|
18
|
+
"warnings"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"schemaVersion": {
|
|
22
|
+
"const": 1
|
|
23
|
+
},
|
|
24
|
+
"projectId": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"profileMode": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"source": {
|
|
31
|
+
"enum": [
|
|
32
|
+
"onboarding-record",
|
|
33
|
+
"approved-workflow",
|
|
34
|
+
"manual"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"summary": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"maxLength": 1200
|
|
41
|
+
},
|
|
42
|
+
"generatedAt": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
},
|
|
46
|
+
"updatedAt": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
},
|
|
50
|
+
"policy": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": [
|
|
54
|
+
"enabled",
|
|
55
|
+
"path",
|
|
56
|
+
"writePolicy",
|
|
57
|
+
"requireCitations",
|
|
58
|
+
"maxNodes",
|
|
59
|
+
"maxEdges",
|
|
60
|
+
"includeTechStack",
|
|
61
|
+
"includeMemoryPointers"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"enabled": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
},
|
|
67
|
+
"path": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"writePolicy": {
|
|
72
|
+
"enum": [
|
|
73
|
+
"onboarding-record",
|
|
74
|
+
"approved-workflow",
|
|
75
|
+
"off"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"requireCitations": {
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
},
|
|
81
|
+
"maxNodes": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 1,
|
|
84
|
+
"maximum": 500
|
|
85
|
+
},
|
|
86
|
+
"maxEdges": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"maximum": 1000
|
|
90
|
+
},
|
|
91
|
+
"includeTechStack": {
|
|
92
|
+
"type": "boolean"
|
|
93
|
+
},
|
|
94
|
+
"includeMemoryPointers": {
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"nodes": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"maxItems": 500,
|
|
102
|
+
"items": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": [
|
|
106
|
+
"id",
|
|
107
|
+
"kind",
|
|
108
|
+
"label"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"id": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"maxLength": 140
|
|
115
|
+
},
|
|
116
|
+
"kind": {
|
|
117
|
+
"enum": [
|
|
118
|
+
"profile",
|
|
119
|
+
"tech",
|
|
120
|
+
"module",
|
|
121
|
+
"command",
|
|
122
|
+
"doc",
|
|
123
|
+
"decision",
|
|
124
|
+
"risk",
|
|
125
|
+
"memory",
|
|
126
|
+
"task",
|
|
127
|
+
"verify",
|
|
128
|
+
"context"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"label": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"minLength": 1,
|
|
134
|
+
"maxLength": 160
|
|
135
|
+
},
|
|
136
|
+
"summary": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"maxLength": 500
|
|
139
|
+
},
|
|
140
|
+
"path": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"maxLength": 240
|
|
143
|
+
},
|
|
144
|
+
"tags": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"maxItems": 16,
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"maxLength": 60
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"citations": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"maxItems": 12,
|
|
155
|
+
"items": {
|
|
156
|
+
"$ref": "#/$defs/citation"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"updatedAt": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"edges": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"maxItems": 1000,
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": [
|
|
172
|
+
"from",
|
|
173
|
+
"to",
|
|
174
|
+
"kind"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"from": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1,
|
|
180
|
+
"maxLength": 140
|
|
181
|
+
},
|
|
182
|
+
"to": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1,
|
|
185
|
+
"maxLength": 140
|
|
186
|
+
},
|
|
187
|
+
"kind": {
|
|
188
|
+
"enum": [
|
|
189
|
+
"uses_tech",
|
|
190
|
+
"depends_on",
|
|
191
|
+
"verified_by",
|
|
192
|
+
"protected_by",
|
|
193
|
+
"documented_by",
|
|
194
|
+
"derived_from",
|
|
195
|
+
"updates",
|
|
196
|
+
"relates_to"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"reason": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"maxLength": 240
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"citations": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"maxItems": 80,
|
|
209
|
+
"items": {
|
|
210
|
+
"$ref": "#/$defs/citation"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"warnings": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"maxItems": 40,
|
|
216
|
+
"items": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"$defs": {
|
|
222
|
+
"citation": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"properties": {
|
|
226
|
+
"path": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"maxLength": 240
|
|
229
|
+
},
|
|
230
|
+
"reason": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"maxLength": 300
|
|
233
|
+
},
|
|
234
|
+
"url": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"maxLength": 300
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"anyOf": [
|
|
240
|
+
{
|
|
241
|
+
"required": [
|
|
242
|
+
"path"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"required": [
|
|
247
|
+
"url"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"required": [
|
|
252
|
+
"reason"
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Vt-mmm/piagent/schemas/eval-scenario.schema.json",
|
|
4
|
+
"title": "Pi Agent Eval Scenario",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["apiVersion", "kind", "metadata", "spec"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"apiVersion": { "const": "piagent/v1" },
|
|
10
|
+
"kind": { "const": "EvalScenario" },
|
|
11
|
+
"metadata": { "$ref": "capability-pack.schema.json#/$defs/metadata" },
|
|
12
|
+
"spec": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["fixture", "profile", "task", "expected", "budget"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"fixture": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["path"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"path": { "$ref": "capability-pack.schema.json#/$defs/relativePath" },
|
|
23
|
+
"digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"profile": { "$ref": "capability-pack.schema.json#/$defs/relativePath" },
|
|
27
|
+
"task": { "type": "string", "minLength": 1, "maxLength": 8000 },
|
|
28
|
+
"expected": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["verifyCommands", "forbiddenPaths", "forbiddenActions", "requiredArtifacts"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"verifyCommands": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"maxItems": 32,
|
|
36
|
+
"uniqueItems": true,
|
|
37
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 256 }
|
|
38
|
+
},
|
|
39
|
+
"forbiddenPaths": { "$ref": "capability-pack.schema.json#/$defs/pathPatterns" },
|
|
40
|
+
"forbiddenActions": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"maxItems": 32,
|
|
43
|
+
"uniqueItems": true,
|
|
44
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
45
|
+
},
|
|
46
|
+
"requiredArtifacts": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"maxItems": 32,
|
|
49
|
+
"uniqueItems": true,
|
|
50
|
+
"items": { "$ref": "capability-pack.schema.json#/$defs/identifier" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"budget": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["maxDurationSeconds", "maxTokens", "maxToolCalls"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"maxDurationSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
|
|
60
|
+
"maxTokens": { "type": "integer", "minimum": 1, "maximum": 2000000 },
|
|
61
|
+
"maxToolCalls": { "type": "integer", "minimum": 1, "maximum": 10000 }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|