perttool 0.1.0-alpha.2 → 0.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +78 -28
  2. package/README.md +173 -95
  3. package/dist/application/agent-help.d.ts +3 -0
  4. package/dist/application/agent-help.d.ts.map +1 -0
  5. package/dist/application/agent-help.js +5 -0
  6. package/dist/application/agent-help.js.map +1 -0
  7. package/dist/application/analyze.js +5 -5
  8. package/dist/application/analyze.js.map +1 -1
  9. package/dist/application/init.d.ts +42 -0
  10. package/dist/application/init.d.ts.map +1 -0
  11. package/dist/application/init.js +217 -0
  12. package/dist/application/init.js.map +1 -0
  13. package/dist/application/mutate.d.ts.map +1 -1
  14. package/dist/application/mutate.js +28 -15
  15. package/dist/application/mutate.js.map +1 -1
  16. package/dist/application/project.d.ts +25 -0
  17. package/dist/application/project.d.ts.map +1 -0
  18. package/dist/application/project.js +54 -0
  19. package/dist/application/project.js.map +1 -0
  20. package/dist/cli.js +419 -331
  21. package/dist/cli.js.map +1 -1
  22. package/dist/command/discovery.d.ts +30 -0
  23. package/dist/command/discovery.d.ts.map +1 -0
  24. package/dist/command/discovery.js +625 -0
  25. package/dist/command/discovery.js.map +1 -0
  26. package/dist/command/registry.d.ts +84 -0
  27. package/dist/command/registry.d.ts.map +1 -0
  28. package/dist/command/registry.js +951 -0
  29. package/dist/command/registry.js.map +1 -0
  30. package/dist/command/usage.d.ts +42 -0
  31. package/dist/command/usage.d.ts.map +1 -0
  32. package/dist/command/usage.js +337 -0
  33. package/dist/command/usage.js.map +1 -0
  34. package/dist/conversion/mermaid-import.js +56 -56
  35. package/dist/conversion/mermaid-import.js.map +1 -1
  36. package/dist/conversion/mermaid.js +1 -1
  37. package/dist/conversion/mermaid.js.map +1 -1
  38. package/dist/guidance/profile.d.ts +6 -0
  39. package/dist/guidance/profile.d.ts.map +1 -0
  40. package/dist/guidance/profile.js +1158 -0
  41. package/dist/guidance/profile.js.map +1 -0
  42. package/dist/guidance/projection.d.ts +16 -0
  43. package/dist/guidance/projection.d.ts.map +1 -0
  44. package/dist/guidance/projection.js +276 -0
  45. package/dist/guidance/projection.js.map +1 -0
  46. package/dist/guidance/query.d.ts +4 -0
  47. package/dist/guidance/query.d.ts.map +1 -0
  48. package/dist/guidance/query.js +178 -0
  49. package/dist/guidance/query.js.map +1 -0
  50. package/dist/guidance/text.d.ts +4 -0
  51. package/dist/guidance/text.d.ts.map +1 -0
  52. package/dist/guidance/text.js +118 -0
  53. package/dist/guidance/text.js.map +1 -0
  54. package/dist/guidance/types.d.ts +227 -0
  55. package/dist/guidance/types.d.ts.map +1 -0
  56. package/dist/guidance/types.js +54 -0
  57. package/dist/guidance/types.js.map +1 -0
  58. package/dist/guidance/validator.d.ts +8 -0
  59. package/dist/guidance/validator.d.ts.map +1 -0
  60. package/dist/guidance/validator.js +383 -0
  61. package/dist/guidance/validator.js.map +1 -0
  62. package/dist/help/guide.d.ts +12 -0
  63. package/dist/help/guide.d.ts.map +1 -0
  64. package/dist/help/guide.js +103 -0
  65. package/dist/help/guide.js.map +1 -0
  66. package/dist/help/registry.d.ts.map +1 -1
  67. package/dist/help/registry.js +76 -67
  68. package/dist/help/registry.js.map +1 -1
  69. package/dist/index.d.ts +21 -1
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +13 -0
  72. package/dist/index.js.map +1 -1
  73. package/dist/io/safe-write.js +17 -17
  74. package/dist/io/safe-write.js.map +1 -1
  75. package/dist/mutation/gate.d.ts +5 -0
  76. package/dist/mutation/gate.d.ts.map +1 -0
  77. package/dist/mutation/gate.js +156 -0
  78. package/dist/mutation/gate.js.map +1 -0
  79. package/dist/mutation/milestone.js +26 -26
  80. package/dist/mutation/milestone.js.map +1 -1
  81. package/dist/mutation/project.d.ts +5 -0
  82. package/dist/mutation/project.d.ts.map +1 -0
  83. package/dist/mutation/project.js +148 -0
  84. package/dist/mutation/project.js.map +1 -0
  85. package/dist/mutation/resource.js +22 -22
  86. package/dist/mutation/resource.js.map +1 -1
  87. package/dist/mutation/task.js +40 -40
  88. package/dist/mutation/task.js.map +1 -1
  89. package/dist/mutation/types.d.ts +46 -1
  90. package/dist/mutation/types.d.ts.map +1 -1
  91. package/dist/parser/document-parser.js +17 -17
  92. package/dist/parser/document-parser.js.map +1 -1
  93. package/dist/semantic/validator.js +41 -41
  94. package/dist/semantic/validator.js.map +1 -1
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.d.ts.map +1 -1
  97. package/dist/version.js +1 -1
  98. package/dist/version.js.map +1 -1
  99. package/package.json +4 -4
@@ -0,0 +1,1158 @@
1
+ import { AGENT_GUIDANCE_PROVIDER_IDS, AGENT_GUIDANCE_SCOPE_IDS, AGENT_GUIDANCE_SURFACE_IDS, } from "./types.js";
2
+ import { compareAgentGuidanceUtf8, createAgentGuidanceProfileSnapshot, } from "./validator.js";
3
+ const SNAPSHOT_AS_OF = "2026-07-23";
4
+ const DEFAULT_REVIEW_AFTER = "2026-10-23";
5
+ const evidenceKinds = {
6
+ native: "official_native_documentation",
7
+ compatible: "official_compatibility_documentation",
8
+ preview: "official_preview_notice",
9
+ deprecated: "official_deprecation_notice",
10
+ unsupported: "official_unsupported_notice",
11
+ unknown: "insufficient_official_evidence",
12
+ };
13
+ const statusDescriptions = {
14
+ native: "Official documentation identifies a provider-native surface.",
15
+ compatible: "Official documentation identifies compatibility with another provider format.",
16
+ preview: "Official documentation identifies this surface as preview.",
17
+ deprecated: "Official documentation identifies this surface as deprecated.",
18
+ unsupported: "Official documentation explicitly identifies this surface as unavailable.",
19
+ unknown: "The inspected official documentation is insufficient to classify support.",
20
+ };
21
+ function description(key, text) {
22
+ return {
23
+ key,
24
+ parameters: [],
25
+ text,
26
+ };
27
+ }
28
+ export const AGENT_GUIDANCE_GUIDANCE_REGISTRY_V1 = [
29
+ {
30
+ guidanceId: "project_plan_is_authority",
31
+ origin: "project_control",
32
+ directive: "must",
33
+ surfaceIds: [],
34
+ description: description("guidance.project_plan_is_authority", "Treat the project model as the source of task priority."),
35
+ },
36
+ {
37
+ guidanceId: "consult_dag_next_before_start",
38
+ origin: "project_control",
39
+ directive: "must",
40
+ surfaceIds: [],
41
+ description: description("guidance.consult_dag_next_before_start", "Consult the project recommendation before starting new work."),
42
+ },
43
+ {
44
+ guidanceId: "recompute_after_state_change",
45
+ origin: "project_control",
46
+ directive: "must",
47
+ surfaceIds: [],
48
+ description: description("guidance.recompute_after_state_change", "Recompute the project after advancing project state."),
49
+ },
50
+ {
51
+ guidanceId: "require_explicit_human_override",
52
+ origin: "project_control",
53
+ directive: "must",
54
+ surfaceIds: [],
55
+ description: description("guidance.require_explicit_human_override", "Record non-recommended work as an explicit human override."),
56
+ },
57
+ {
58
+ guidanceId: "keep_provider_priority_identical",
59
+ origin: "project_control",
60
+ directive: "must",
61
+ surfaceIds: [],
62
+ description: description("guidance.keep_provider_priority_identical", "Keep project priority rules identical across providers."),
63
+ },
64
+ {
65
+ guidanceId: "use_narrowest_durable_surface",
66
+ origin: "common_surface",
67
+ directive: "should",
68
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
69
+ description: description("guidance.use_narrowest_durable_surface", "Use the narrowest durable surface that satisfies the required scope."),
70
+ },
71
+ {
72
+ guidanceId: "preserve_scope_and_precedence",
73
+ origin: "common_surface",
74
+ directive: "must",
75
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
76
+ description: description("guidance.preserve_scope_and_precedence", "Preserve provider scope and instruction precedence."),
77
+ },
78
+ {
79
+ guidanceId: "review_executable_customization",
80
+ origin: "common_surface",
81
+ directive: "must",
82
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
83
+ description: description("guidance.review_executable_customization", "Review customization that can execute code or external tools."),
84
+ },
85
+ {
86
+ guidanceId: "treat_unknown_as_unavailable",
87
+ origin: "common_surface",
88
+ directive: "must",
89
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
90
+ description: description("guidance.treat_unknown_as_unavailable", "Treat unknown support or placement as unavailable until verified."),
91
+ },
92
+ {
93
+ guidanceId: "review_stale_profile_before_adoption",
94
+ origin: "common_surface",
95
+ directive: "should",
96
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
97
+ description: description("guidance.review_stale_profile_before_adoption", "Review stale profile evidence before adopting a new artifact."),
98
+ },
99
+ ];
100
+ export const AGENT_GUIDANCE_RISK_REGISTRY_V1 = [
101
+ {
102
+ riskId: "instruction_precedence_changes_effective_policy",
103
+ kind: "scope",
104
+ surfaceIds: ["instruction"],
105
+ mitigationGuidanceIds: ["preserve_scope_and_precedence"],
106
+ description: description("risk.instruction_precedence_changes_effective_policy", "Instruction precedence can change the effective project policy."),
107
+ },
108
+ {
109
+ riskId: "instruction_truncation_hides_policy",
110
+ kind: "scope",
111
+ surfaceIds: ["instruction"],
112
+ mitigationGuidanceIds: ["use_narrowest_durable_surface"],
113
+ description: description("risk.instruction_truncation_hides_policy", "Instruction truncation can hide required project policy."),
114
+ },
115
+ {
116
+ riskId: "workflow_executes_commands",
117
+ kind: "execution",
118
+ surfaceIds: ["workflow"],
119
+ mitigationGuidanceIds: ["review_executable_customization"],
120
+ description: description("risk.workflow_executes_commands", "A reusable workflow can execute commands."),
121
+ },
122
+ {
123
+ riskId: "delegation_loses_parent_context",
124
+ kind: "delegation",
125
+ surfaceIds: ["delegated_agent"],
126
+ mitigationGuidanceIds: [
127
+ "project_plan_is_authority",
128
+ "consult_dag_next_before_start",
129
+ ],
130
+ description: description("risk.delegation_loses_parent_context", "A delegated agent can lose required parent context."),
131
+ },
132
+ {
133
+ riskId: "parallel_writes_conflict",
134
+ kind: "delegation",
135
+ surfaceIds: ["delegated_agent"],
136
+ mitigationGuidanceIds: ["preserve_scope_and_precedence"],
137
+ description: description("risk.parallel_writes_conflict", "Parallel delegated work can create conflicting writes."),
138
+ },
139
+ {
140
+ riskId: "hook_executes_code",
141
+ kind: "execution",
142
+ surfaceIds: ["enforcement"],
143
+ mitigationGuidanceIds: ["review_executable_customization"],
144
+ description: description("risk.hook_executes_code", "An enforcement hook can execute code."),
145
+ },
146
+ {
147
+ riskId: "hook_can_block_or_mutate_flow",
148
+ kind: "execution",
149
+ surfaceIds: ["enforcement"],
150
+ mitigationGuidanceIds: [
151
+ "review_executable_customization",
152
+ "require_explicit_human_override",
153
+ ],
154
+ description: description("risk.hook_can_block_or_mutate_flow", "An enforcement hook can block or mutate the agent workflow."),
155
+ },
156
+ {
157
+ riskId: "prompt_not_persistent",
158
+ kind: "scope",
159
+ surfaceIds: ["prompt"],
160
+ mitigationGuidanceIds: ["use_narrowest_durable_surface"],
161
+ description: description("risk.prompt_not_persistent", "A manually invoked prompt may not persist project policy."),
162
+ },
163
+ {
164
+ riskId: "connector_accesses_external_data",
165
+ kind: "external_access",
166
+ surfaceIds: ["connector"],
167
+ mitigationGuidanceIds: ["review_executable_customization"],
168
+ description: description("risk.connector_accesses_external_data", "A connector can access external data."),
169
+ },
170
+ {
171
+ riskId: "connector_can_execute_external_action",
172
+ kind: "external_access",
173
+ surfaceIds: ["connector"],
174
+ mitigationGuidanceIds: [
175
+ "review_executable_customization",
176
+ "require_explicit_human_override",
177
+ ],
178
+ description: description("risk.connector_can_execute_external_action", "A connector can execute an external action."),
179
+ },
180
+ {
181
+ riskId: "provider_surface_availability_varies",
182
+ kind: "compatibility",
183
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
184
+ mitigationGuidanceIds: ["treat_unknown_as_unavailable"],
185
+ description: description("risk.provider_surface_availability_varies", "Surface availability can vary across provider products and releases."),
186
+ },
187
+ {
188
+ riskId: "profile_may_be_stale",
189
+ kind: "staleness",
190
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
191
+ mitigationGuidanceIds: ["review_stale_profile_before_adoption"],
192
+ description: description("risk.profile_may_be_stale", "The bundled provider profile can become stale."),
193
+ },
194
+ {
195
+ riskId: "artifact_path_unknown",
196
+ kind: "compatibility",
197
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
198
+ mitigationGuidanceIds: ["treat_unknown_as_unavailable"],
199
+ description: description("risk.artifact_path_unknown", "The durable artifact path is not established by official evidence."),
200
+ },
201
+ {
202
+ riskId: "compatibility_not_native",
203
+ kind: "compatibility",
204
+ surfaceIds: AGENT_GUIDANCE_SURFACE_IDS,
205
+ mitigationGuidanceIds: ["preserve_scope_and_precedence"],
206
+ description: description("risk.compatibility_not_native", "A compatible artifact is not a provider-native artifact."),
207
+ },
208
+ ];
209
+ function evidence(status, sourceIds, fact) {
210
+ return {
211
+ evidenceKind: evidenceKinds[status],
212
+ sourceIds,
213
+ facts: [fact],
214
+ description: description(`status.${status}`, statusDescriptions[status]),
215
+ };
216
+ }
217
+ const scopeRank = new Map(AGENT_GUIDANCE_SCOPE_IDS.map((scopeId, index) => [scopeId, index]));
218
+ function compareArtifacts(left, right) {
219
+ return (Number(right.primary) - Number(left.primary) ||
220
+ (scopeRank.get(left.scopeIds[0]) ?? Number.MAX_SAFE_INTEGER) -
221
+ (scopeRank.get(right.scopeIds[0]) ?? Number.MAX_SAFE_INTEGER) ||
222
+ compareAgentGuidanceUtf8(left.path, right.path) ||
223
+ compareAgentGuidanceUtf8(left.artifactId, right.artifactId));
224
+ }
225
+ function makeSurface(providerId, definition) {
226
+ const artifacts = definition.artifacts
227
+ .map((artifact, index) => {
228
+ const status = artifact.status ?? definition.status ?? "native";
229
+ return {
230
+ artifactId: `${providerId}.${definition.surfaceId}.${artifact.key}`,
231
+ path: artifact.path,
232
+ scopeIds: artifact.scopes,
233
+ primary: index === 0,
234
+ supportStatus: status,
235
+ statusEvidence: evidence(status, definition.sourceIds, status === "compatible"
236
+ ? `Official documentation identifies ${artifact.path} as a compatible artifact.`
237
+ : (definition.fact ??
238
+ `Official documentation identifies ${providerId} ${definition.surfaceId} support.`)),
239
+ };
240
+ })
241
+ .sort(compareArtifacts);
242
+ const surfaceStatus = artifacts.find(({ primary }) => primary)?.supportStatus ??
243
+ definition.status ??
244
+ "native";
245
+ const artifactResolution = artifacts.length === 0 ? "unknown" : "known";
246
+ const riskIds = AGENT_GUIDANCE_RISK_REGISTRY_V1.filter(({ riskId, surfaceIds }) => surfaceIds.includes(definition.surfaceId) &&
247
+ (riskId !== "artifact_path_unknown" || artifactResolution === "unknown") &&
248
+ (riskId !== "compatibility_not_native" ||
249
+ artifacts.some(({ supportStatus }) => supportStatus === "compatible"))).map(({ riskId }) => riskId);
250
+ return {
251
+ surfaceId: definition.surfaceId,
252
+ supportStatus: surfaceStatus,
253
+ primaryArtifactId: artifacts.find(({ primary }) => primary)?.artifactId ?? null,
254
+ artifactResolution,
255
+ providerTerms: definition.providerTerms,
256
+ scopes: definition.scopes,
257
+ artifacts,
258
+ guidanceIds: AGENT_GUIDANCE_GUIDANCE_REGISTRY_V1.filter(({ surfaceIds }) => surfaceIds.length === 0 || surfaceIds.includes(definition.surfaceId)).map(({ guidanceId }) => guidanceId),
259
+ riskIds,
260
+ statusEvidence: evidence(surfaceStatus, definition.sourceIds, definition.fact ??
261
+ `Official documentation identifies ${providerId} ${definition.surfaceId} support.`),
262
+ verifiedAt: SNAPSHOT_AS_OF,
263
+ reviewAfter: DEFAULT_REVIEW_AFTER,
264
+ };
265
+ }
266
+ function makeProvider(providerId, displayName, aliases, definitions) {
267
+ return {
268
+ providerId,
269
+ displayName,
270
+ aliases,
271
+ surfaces: definitions.map((definition) => makeSurface(providerId, definition)),
272
+ };
273
+ }
274
+ const sources = [
275
+ {
276
+ sourceId: "codex-agents-md",
277
+ providerId: "codex",
278
+ title: "Custom instructions with AGENTS.md",
279
+ url: "https://learn.chatgpt.com/docs/agent-configuration/agents-md.md",
280
+ verifiedAt: SNAPSHOT_AS_OF,
281
+ },
282
+ {
283
+ sourceId: "codex-skills",
284
+ providerId: "codex",
285
+ title: "Build skills",
286
+ url: "https://learn.chatgpt.com/docs/build-skills.md",
287
+ verifiedAt: SNAPSHOT_AS_OF,
288
+ },
289
+ {
290
+ sourceId: "codex-subagents",
291
+ providerId: "codex",
292
+ title: "Subagents",
293
+ url: "https://learn.chatgpt.com/docs/agent-configuration/subagents.md",
294
+ verifiedAt: SNAPSHOT_AS_OF,
295
+ },
296
+ {
297
+ sourceId: "codex-hooks",
298
+ providerId: "codex",
299
+ title: "Hooks",
300
+ url: "https://learn.chatgpt.com/docs/hooks.md",
301
+ verifiedAt: SNAPSHOT_AS_OF,
302
+ },
303
+ {
304
+ sourceId: "codex-custom-prompts",
305
+ providerId: "codex",
306
+ title: "Custom Prompts",
307
+ url: "https://learn.chatgpt.com/docs/custom-prompts.md",
308
+ verifiedAt: SNAPSHOT_AS_OF,
309
+ },
310
+ {
311
+ sourceId: "codex-mcp",
312
+ providerId: "codex",
313
+ title: "Model Context Protocol",
314
+ url: "https://learn.chatgpt.com/docs/extend/mcp.md",
315
+ verifiedAt: SNAPSHOT_AS_OF,
316
+ },
317
+ {
318
+ sourceId: "github-response-customization",
319
+ providerId: "github-copilot",
320
+ title: "About customizing GitHub Copilot responses",
321
+ url: "https://docs.github.com/en/copilot/concepts/prompting/response-customization",
322
+ verifiedAt: SNAPSHOT_AS_OF,
323
+ },
324
+ {
325
+ sourceId: "github-agent-skills",
326
+ providerId: "github-copilot",
327
+ title: "About agent skills",
328
+ url: "https://docs.github.com/en/copilot/concepts/agents/about-agent-skills",
329
+ verifiedAt: SNAPSHOT_AS_OF,
330
+ },
331
+ {
332
+ sourceId: "github-custom-agents-cli",
333
+ providerId: "github-copilot",
334
+ title: "Creating and using custom agents for GitHub Copilot CLI",
335
+ url: "https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/create-custom-agents-for-cli",
336
+ verifiedAt: SNAPSHOT_AS_OF,
337
+ },
338
+ {
339
+ sourceId: "github-hooks",
340
+ providerId: "github-copilot",
341
+ title: "About hooks",
342
+ url: "https://docs.github.com/en/copilot/concepts/agents/hooks",
343
+ verifiedAt: SNAPSHOT_AS_OF,
344
+ },
345
+ {
346
+ sourceId: "github-prompt-files",
347
+ providerId: "github-copilot",
348
+ title: "Adding repository custom instructions for GitHub Copilot in your IDE",
349
+ url: "https://docs.github.com/en/copilot/how-tos/configure-custom-instructions-in-your-ide/add-repository-instructions-in-your-ide",
350
+ verifiedAt: SNAPSHOT_AS_OF,
351
+ },
352
+ {
353
+ sourceId: "github-cli-config",
354
+ providerId: "github-copilot",
355
+ title: "GitHub Copilot CLI configuration directory",
356
+ url: "https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference",
357
+ verifiedAt: SNAPSHOT_AS_OF,
358
+ },
359
+ {
360
+ sourceId: "claude-directory",
361
+ providerId: "claude-code",
362
+ title: "Explore the .claude directory",
363
+ url: "https://code.claude.com/docs/en/claude-directory",
364
+ verifiedAt: SNAPSHOT_AS_OF,
365
+ },
366
+ {
367
+ sourceId: "claude-skills",
368
+ providerId: "claude-code",
369
+ title: "Extend Claude with skills",
370
+ url: "https://code.claude.com/docs/en/slash-commands",
371
+ verifiedAt: SNAPSHOT_AS_OF,
372
+ },
373
+ {
374
+ sourceId: "claude-subagents",
375
+ providerId: "claude-code",
376
+ title: "Create custom subagents",
377
+ url: "https://code.claude.com/docs/en/sub-agents",
378
+ verifiedAt: SNAPSHOT_AS_OF,
379
+ },
380
+ {
381
+ sourceId: "claude-hooks",
382
+ providerId: "claude-code",
383
+ title: "Hooks reference",
384
+ url: "https://code.claude.com/docs/en/hooks",
385
+ verifiedAt: SNAPSHOT_AS_OF,
386
+ },
387
+ {
388
+ sourceId: "claude-mcp",
389
+ providerId: "claude-code",
390
+ title: "Connect Claude Code to tools via MCP",
391
+ url: "https://code.claude.com/docs/en/mcp",
392
+ verifiedAt: SNAPSHOT_AS_OF,
393
+ },
394
+ {
395
+ sourceId: "grok-extensions",
396
+ providerId: "grok-build",
397
+ title: "Skills, Plugins and Marketplaces",
398
+ url: "https://docs.x.ai/build/features/skills-plugins-marketplaces",
399
+ verifiedAt: SNAPSHOT_AS_OF,
400
+ },
401
+ {
402
+ sourceId: "grok-permissions",
403
+ providerId: "grok-build",
404
+ title: "Permissions",
405
+ url: "https://docs.x.ai/build/features/permissions",
406
+ verifiedAt: SNAPSHOT_AS_OF,
407
+ },
408
+ {
409
+ sourceId: "grok-mcp",
410
+ providerId: "grok-build",
411
+ title: "MCP Servers",
412
+ url: "https://docs.x.ai/build/features/mcp-servers",
413
+ verifiedAt: SNAPSHOT_AS_OF,
414
+ },
415
+ {
416
+ sourceId: "grok-release-notes",
417
+ providerId: "grok-build",
418
+ title: "Release Notes",
419
+ url: "https://docs.x.ai/developers/release-notes",
420
+ verifiedAt: SNAPSHOT_AS_OF,
421
+ },
422
+ {
423
+ sourceId: "antigravity-rules-workflows",
424
+ providerId: "antigravity",
425
+ title: "Rules and Workflows",
426
+ url: "https://www.antigravity.google/docs/rules-workflows",
427
+ verifiedAt: SNAPSHOT_AS_OF,
428
+ },
429
+ {
430
+ sourceId: "antigravity-skills",
431
+ providerId: "antigravity",
432
+ title: "Agent Skills",
433
+ url: "https://www.antigravity.google/docs/skills",
434
+ verifiedAt: SNAPSHOT_AS_OF,
435
+ },
436
+ {
437
+ sourceId: "antigravity-subagents",
438
+ providerId: "antigravity",
439
+ title: "Asynchronous Subagents",
440
+ url: "https://www.antigravity.google/docs/subagents",
441
+ verifiedAt: SNAPSHOT_AS_OF,
442
+ },
443
+ {
444
+ sourceId: "antigravity-hooks",
445
+ providerId: "antigravity",
446
+ title: "Hooks",
447
+ url: "https://www.antigravity.google/docs/hooks",
448
+ verifiedAt: SNAPSHOT_AS_OF,
449
+ },
450
+ {
451
+ sourceId: "antigravity-mcp",
452
+ providerId: "antigravity",
453
+ title: "Model Context Protocol",
454
+ url: "https://www.antigravity.google/docs/mcp",
455
+ verifiedAt: SNAPSHOT_AS_OF,
456
+ },
457
+ {
458
+ sourceId: "antigravity-plugins",
459
+ providerId: "antigravity",
460
+ title: "Plugins",
461
+ url: "https://www.antigravity.google/docs/plugins",
462
+ verifiedAt: SNAPSHOT_AS_OF,
463
+ },
464
+ ];
465
+ const providers = [
466
+ makeProvider("codex", "Codex", [], [
467
+ {
468
+ surfaceId: "instruction",
469
+ providerTerms: ["AGENTS.md", "AGENTS.override.md"],
470
+ scopes: ["repository", "directory", "user"],
471
+ sourceIds: ["codex-agents-md"],
472
+ artifacts: [
473
+ {
474
+ key: "agents",
475
+ path: "AGENTS.md",
476
+ scopes: ["repository", "directory"],
477
+ },
478
+ {
479
+ key: "agents-override",
480
+ path: "AGENTS.override.md",
481
+ scopes: ["repository", "directory"],
482
+ },
483
+ {
484
+ key: "user-agents",
485
+ path: "~/.codex/AGENTS.md",
486
+ scopes: ["user"],
487
+ },
488
+ {
489
+ key: "user-agents-override",
490
+ path: "~/.codex/AGENTS.override.md",
491
+ scopes: ["user"],
492
+ },
493
+ ],
494
+ },
495
+ {
496
+ surfaceId: "workflow",
497
+ providerTerms: ["Agent Skills"],
498
+ scopes: ["repository", "directory", "user", "admin", "system", "plugin"],
499
+ sourceIds: ["codex-skills"],
500
+ artifacts: [
501
+ {
502
+ key: "project-skill",
503
+ path: ".agents/skills/<skill-name>/SKILL.md",
504
+ scopes: ["repository", "directory"],
505
+ },
506
+ {
507
+ key: "user-skill",
508
+ path: "~/.agents/skills/<skill-name>/SKILL.md",
509
+ scopes: ["user"],
510
+ },
511
+ ],
512
+ },
513
+ {
514
+ surfaceId: "delegated_agent",
515
+ providerTerms: ["subagent", "custom agent"],
516
+ scopes: ["repository", "user", "session"],
517
+ sourceIds: ["codex-subagents"],
518
+ artifacts: [
519
+ {
520
+ key: "project-agent",
521
+ path: ".codex/agents/<agent-name>.toml",
522
+ scopes: ["repository"],
523
+ },
524
+ {
525
+ key: "user-agent",
526
+ path: "~/.codex/agents/<agent-name>.toml",
527
+ scopes: ["user"],
528
+ },
529
+ ],
530
+ },
531
+ {
532
+ surfaceId: "enforcement",
533
+ providerTerms: ["hooks"],
534
+ scopes: ["repository", "user", "managed", "plugin"],
535
+ sourceIds: ["codex-hooks"],
536
+ artifacts: [
537
+ {
538
+ key: "project-hooks",
539
+ path: ".codex/hooks.json",
540
+ scopes: ["repository"],
541
+ },
542
+ {
543
+ key: "project-config",
544
+ path: ".codex/config.toml",
545
+ scopes: ["repository"],
546
+ },
547
+ {
548
+ key: "user-hooks",
549
+ path: "~/.codex/hooks.json",
550
+ scopes: ["user"],
551
+ },
552
+ {
553
+ key: "user-config",
554
+ path: "~/.codex/config.toml",
555
+ scopes: ["user"],
556
+ },
557
+ ],
558
+ },
559
+ {
560
+ surfaceId: "prompt",
561
+ providerTerms: ["custom prompts"],
562
+ scopes: ["user"],
563
+ sourceIds: ["codex-custom-prompts"],
564
+ status: "deprecated",
565
+ fact: "Official documentation marks custom prompts deprecated and recommends Skills.",
566
+ artifacts: [
567
+ {
568
+ key: "user-prompt",
569
+ path: "~/.codex/prompts/<prompt-name>.md",
570
+ scopes: ["user"],
571
+ },
572
+ ],
573
+ },
574
+ {
575
+ surfaceId: "connector",
576
+ providerTerms: ["MCP"],
577
+ scopes: ["repository", "user", "plugin"],
578
+ sourceIds: ["codex-mcp"],
579
+ artifacts: [
580
+ {
581
+ key: "project-config",
582
+ path: ".codex/config.toml",
583
+ scopes: ["repository"],
584
+ },
585
+ {
586
+ key: "user-config",
587
+ path: "~/.codex/config.toml",
588
+ scopes: ["user"],
589
+ },
590
+ ],
591
+ },
592
+ ]),
593
+ makeProvider("github-copilot", "GitHub Copilot", [], [
594
+ {
595
+ surfaceId: "instruction",
596
+ providerTerms: [
597
+ "repository custom instructions",
598
+ "path-specific custom instructions",
599
+ "agent instructions",
600
+ ],
601
+ scopes: ["repository", "directory", "user", "organization"],
602
+ sourceIds: ["github-response-customization"],
603
+ artifacts: [
604
+ {
605
+ key: "repository-instructions",
606
+ path: ".github/copilot-instructions.md",
607
+ scopes: ["repository"],
608
+ },
609
+ {
610
+ key: "path-instructions",
611
+ path: ".github/instructions/<instruction-name>.instructions.md",
612
+ scopes: ["repository"],
613
+ },
614
+ {
615
+ key: "agents-compatible",
616
+ path: "AGENTS.md",
617
+ scopes: ["repository", "directory"],
618
+ status: "compatible",
619
+ },
620
+ ],
621
+ },
622
+ {
623
+ surfaceId: "workflow",
624
+ providerTerms: ["Agent Skills"],
625
+ scopes: ["repository", "user", "organization"],
626
+ sourceIds: ["github-agent-skills"],
627
+ artifacts: [
628
+ {
629
+ key: "github-skill",
630
+ path: ".github/skills/<skill-name>/SKILL.md",
631
+ scopes: ["repository"],
632
+ },
633
+ {
634
+ key: "agents-compatible-skill",
635
+ path: ".agents/skills/<skill-name>/SKILL.md",
636
+ scopes: ["repository", "compatibility"],
637
+ status: "compatible",
638
+ },
639
+ {
640
+ key: "claude-compatible-skill",
641
+ path: ".claude/skills/<skill-name>/SKILL.md",
642
+ scopes: ["repository", "compatibility"],
643
+ status: "compatible",
644
+ },
645
+ {
646
+ key: "user-skill",
647
+ path: "~/.copilot/skills/<skill-name>/SKILL.md",
648
+ scopes: ["user"],
649
+ },
650
+ {
651
+ key: "user-compatible-skill",
652
+ path: "~/.agents/skills/<skill-name>/SKILL.md",
653
+ scopes: ["user", "compatibility"],
654
+ status: "compatible",
655
+ },
656
+ ],
657
+ },
658
+ {
659
+ surfaceId: "delegated_agent",
660
+ providerTerms: ["custom agent", "subagent"],
661
+ scopes: ["repository", "user", "organization", "enterprise", "session"],
662
+ sourceIds: ["github-custom-agents-cli"],
663
+ artifacts: [
664
+ {
665
+ key: "project-agent",
666
+ path: ".github/agents/<agent-name>.agent.md",
667
+ scopes: ["repository"],
668
+ },
669
+ {
670
+ key: "user-agent",
671
+ path: "~/.copilot/agents/<agent-name>.agent.md",
672
+ scopes: ["user"],
673
+ },
674
+ ],
675
+ },
676
+ {
677
+ surfaceId: "enforcement",
678
+ providerTerms: ["hooks"],
679
+ scopes: ["repository", "user"],
680
+ sourceIds: ["github-hooks"],
681
+ artifacts: [
682
+ {
683
+ key: "project-hook",
684
+ path: ".github/hooks/<hook-name>.json",
685
+ scopes: ["repository"],
686
+ },
687
+ {
688
+ key: "user-hook",
689
+ path: "~/.copilot/hooks/<hook-name>.json",
690
+ scopes: ["user"],
691
+ },
692
+ ],
693
+ },
694
+ {
695
+ surfaceId: "prompt",
696
+ providerTerms: ["prompt files"],
697
+ scopes: ["repository", "workspace"],
698
+ sourceIds: ["github-prompt-files"],
699
+ status: "preview",
700
+ fact: "Official documentation marks prompt files as public preview in selected IDEs.",
701
+ artifacts: [
702
+ {
703
+ key: "project-prompt",
704
+ path: ".github/prompts/<prompt-name>.prompt.md",
705
+ scopes: ["repository", "workspace"],
706
+ },
707
+ ],
708
+ },
709
+ {
710
+ surfaceId: "connector",
711
+ providerTerms: ["MCP"],
712
+ scopes: ["repository", "user", "organization"],
713
+ sourceIds: ["github-cli-config"],
714
+ artifacts: [
715
+ {
716
+ key: "workspace-mcp",
717
+ path: ".mcp.json",
718
+ scopes: ["repository"],
719
+ },
720
+ {
721
+ key: "github-mcp",
722
+ path: ".github/mcp.json",
723
+ scopes: ["repository"],
724
+ },
725
+ {
726
+ key: "user-mcp",
727
+ path: "~/.copilot/mcp-config.json",
728
+ scopes: ["user"],
729
+ },
730
+ ],
731
+ },
732
+ ]),
733
+ makeProvider("claude-code", "Claude Code", [], [
734
+ {
735
+ surfaceId: "instruction",
736
+ providerTerms: ["CLAUDE.md", "rules"],
737
+ scopes: ["repository", "directory", "user", "managed"],
738
+ sourceIds: ["claude-directory"],
739
+ artifacts: [
740
+ {
741
+ key: "claude",
742
+ path: "CLAUDE.md",
743
+ scopes: ["repository", "directory"],
744
+ },
745
+ {
746
+ key: "project-rule",
747
+ path: ".claude/rules/<rule-name>.md",
748
+ scopes: ["repository"],
749
+ },
750
+ {
751
+ key: "user-claude",
752
+ path: "~/.claude/CLAUDE.md",
753
+ scopes: ["user"],
754
+ },
755
+ {
756
+ key: "user-rule",
757
+ path: "~/.claude/rules/<rule-name>.md",
758
+ scopes: ["user"],
759
+ },
760
+ ],
761
+ },
762
+ {
763
+ surfaceId: "workflow",
764
+ providerTerms: ["Skills"],
765
+ scopes: [
766
+ "repository",
767
+ "directory",
768
+ "user",
769
+ "enterprise",
770
+ "plugin",
771
+ ],
772
+ sourceIds: ["claude-skills"],
773
+ artifacts: [
774
+ {
775
+ key: "project-skill",
776
+ path: ".claude/skills/<skill-name>/SKILL.md",
777
+ scopes: ["repository", "directory"],
778
+ },
779
+ {
780
+ key: "user-skill",
781
+ path: "~/.claude/skills/<skill-name>/SKILL.md",
782
+ scopes: ["user"],
783
+ },
784
+ ],
785
+ },
786
+ {
787
+ surfaceId: "delegated_agent",
788
+ providerTerms: ["subagent"],
789
+ scopes: ["repository", "user", "session", "plugin"],
790
+ sourceIds: ["claude-subagents"],
791
+ artifacts: [
792
+ {
793
+ key: "project-agent",
794
+ path: ".claude/agents/<agent-name>.md",
795
+ scopes: ["repository"],
796
+ },
797
+ {
798
+ key: "user-agent",
799
+ path: "~/.claude/agents/<agent-name>.md",
800
+ scopes: ["user"],
801
+ },
802
+ ],
803
+ },
804
+ {
805
+ surfaceId: "enforcement",
806
+ providerTerms: ["hooks", "permissions"],
807
+ scopes: ["repository", "user", "managed", "plugin"],
808
+ sourceIds: ["claude-hooks"],
809
+ artifacts: [
810
+ {
811
+ key: "project-settings",
812
+ path: ".claude/settings.json",
813
+ scopes: ["repository"],
814
+ },
815
+ {
816
+ key: "project-local-settings",
817
+ path: ".claude/settings.local.json",
818
+ scopes: ["repository", "user"],
819
+ },
820
+ {
821
+ key: "user-settings",
822
+ path: "~/.claude/settings.json",
823
+ scopes: ["user"],
824
+ },
825
+ ],
826
+ },
827
+ {
828
+ surfaceId: "prompt",
829
+ providerTerms: ["Skills", "custom commands"],
830
+ scopes: ["repository", "directory", "user", "plugin"],
831
+ sourceIds: ["claude-skills"],
832
+ artifacts: [
833
+ {
834
+ key: "project-skill",
835
+ path: ".claude/skills/<skill-name>/SKILL.md",
836
+ scopes: ["repository", "directory"],
837
+ },
838
+ {
839
+ key: "project-command",
840
+ path: ".claude/commands/<command-name>.md",
841
+ scopes: ["repository"],
842
+ status: "compatible",
843
+ },
844
+ {
845
+ key: "user-skill",
846
+ path: "~/.claude/skills/<skill-name>/SKILL.md",
847
+ scopes: ["user"],
848
+ },
849
+ {
850
+ key: "user-command",
851
+ path: "~/.claude/commands/<command-name>.md",
852
+ scopes: ["user", "compatibility"],
853
+ status: "compatible",
854
+ },
855
+ ],
856
+ },
857
+ {
858
+ surfaceId: "connector",
859
+ providerTerms: ["MCP"],
860
+ scopes: ["repository", "user", "managed", "local", "plugin"],
861
+ sourceIds: ["claude-mcp"],
862
+ artifacts: [
863
+ {
864
+ key: "project-mcp",
865
+ path: ".mcp.json",
866
+ scopes: ["repository"],
867
+ },
868
+ {
869
+ key: "user-local-config",
870
+ path: "~/.claude.json",
871
+ scopes: ["user", "local"],
872
+ },
873
+ ],
874
+ },
875
+ ]),
876
+ makeProvider("grok-build", "Grok Build", ["grok"], [
877
+ {
878
+ surfaceId: "instruction",
879
+ providerTerms: [
880
+ "AGENTS.md instruction-file family",
881
+ "Claude Code compatibility instructions",
882
+ ],
883
+ scopes: ["repository", "directory", "user", "compatibility"],
884
+ sourceIds: ["grok-extensions"],
885
+ artifacts: [
886
+ {
887
+ key: "agents",
888
+ path: "AGENTS.md",
889
+ scopes: ["repository", "directory"],
890
+ },
891
+ {
892
+ key: "agents-case",
893
+ path: "Agents.md",
894
+ scopes: ["repository", "directory"],
895
+ },
896
+ {
897
+ key: "agent",
898
+ path: "AGENT.md",
899
+ scopes: ["repository", "directory"],
900
+ },
901
+ {
902
+ key: "claude-compatible",
903
+ path: "CLAUDE.md",
904
+ scopes: ["repository", "directory", "compatibility"],
905
+ status: "compatible",
906
+ },
907
+ {
908
+ key: "claude-rules-compatible",
909
+ path: ".claude/rules/<rule-name>.md",
910
+ scopes: ["repository", "directory", "compatibility"],
911
+ status: "compatible",
912
+ },
913
+ ],
914
+ },
915
+ {
916
+ surfaceId: "workflow",
917
+ providerTerms: ["Skills"],
918
+ scopes: ["repository", "directory", "user", "plugin", "compatibility"],
919
+ sourceIds: ["grok-extensions"],
920
+ artifacts: [
921
+ {
922
+ key: "project-skill",
923
+ path: ".grok/skills/<skill-name>/SKILL.md",
924
+ scopes: ["repository", "directory"],
925
+ },
926
+ {
927
+ key: "user-skill",
928
+ path: "~/.grok/skills/<skill-name>/SKILL.md",
929
+ scopes: ["user"],
930
+ },
931
+ {
932
+ key: "user-compatible-skill",
933
+ path: "~/.agents/skills/<skill-name>/SKILL.md",
934
+ scopes: ["user", "compatibility"],
935
+ status: "compatible",
936
+ },
937
+ ],
938
+ },
939
+ {
940
+ surfaceId: "delegated_agent",
941
+ providerTerms: [
942
+ "subagent",
943
+ "plugin agent",
944
+ "Claude Code compatible agent",
945
+ ],
946
+ scopes: ["session", "plugin", "compatibility"],
947
+ sourceIds: ["grok-extensions"],
948
+ artifacts: [],
949
+ fact: "Official documentation identifies delegated agents but does not establish a native durable artifact path.",
950
+ },
951
+ {
952
+ surfaceId: "enforcement",
953
+ providerTerms: ["hooks", "permission rules"],
954
+ scopes: ["repository", "user", "managed", "plugin"],
955
+ sourceIds: ["grok-permissions"],
956
+ artifacts: [
957
+ {
958
+ key: "project-hooks",
959
+ path: ".grok/hooks/",
960
+ scopes: ["repository"],
961
+ },
962
+ {
963
+ key: "user-hooks",
964
+ path: "~/.grok/hooks/",
965
+ scopes: ["user"],
966
+ },
967
+ {
968
+ key: "user-config",
969
+ path: "~/.grok/config.toml",
970
+ scopes: ["user"],
971
+ },
972
+ ],
973
+ },
974
+ {
975
+ surfaceId: "prompt",
976
+ providerTerms: ["user-invocable Skill", "command"],
977
+ scopes: ["repository", "directory", "user", "compatibility"],
978
+ sourceIds: ["grok-extensions"],
979
+ artifacts: [
980
+ {
981
+ key: "project-skill",
982
+ path: ".grok/skills/<skill-name>/SKILL.md",
983
+ scopes: ["repository", "directory"],
984
+ },
985
+ {
986
+ key: "user-skill",
987
+ path: "~/.grok/skills/<skill-name>/SKILL.md",
988
+ scopes: ["user"],
989
+ },
990
+ {
991
+ key: "user-compatible-command",
992
+ path: "~/.agents/commands/<command-name>.md",
993
+ scopes: ["user", "compatibility"],
994
+ status: "compatible",
995
+ },
996
+ ],
997
+ },
998
+ {
999
+ surfaceId: "connector",
1000
+ providerTerms: ["MCP"],
1001
+ scopes: ["repository", "user", "plugin", "compatibility"],
1002
+ sourceIds: ["grok-mcp"],
1003
+ artifacts: [
1004
+ {
1005
+ key: "project-config",
1006
+ path: ".grok/config.toml",
1007
+ scopes: ["repository"],
1008
+ },
1009
+ {
1010
+ key: "user-config",
1011
+ path: "~/.grok/config.toml",
1012
+ scopes: ["user"],
1013
+ },
1014
+ {
1015
+ key: "compatible-mcp",
1016
+ path: ".mcp.json",
1017
+ scopes: ["repository", "compatibility"],
1018
+ status: "compatible",
1019
+ },
1020
+ ],
1021
+ },
1022
+ ]),
1023
+ makeProvider("antigravity", "Antigravity", [], [
1024
+ {
1025
+ surfaceId: "instruction",
1026
+ providerTerms: ["Global Rules", "Workspace Rules"],
1027
+ scopes: ["workspace", "user", "plugin"],
1028
+ sourceIds: ["antigravity-rules-workflows"],
1029
+ artifacts: [
1030
+ {
1031
+ key: "user-rule",
1032
+ path: "~/.gemini/GEMINI.md",
1033
+ scopes: ["user"],
1034
+ },
1035
+ {
1036
+ key: "workspace-rule",
1037
+ path: ".agents/rules/<rule-name>.md",
1038
+ scopes: ["workspace"],
1039
+ },
1040
+ {
1041
+ key: "legacy-workspace-rule",
1042
+ path: ".agent/rules/<rule-name>.md",
1043
+ scopes: ["workspace", "compatibility"],
1044
+ status: "compatible",
1045
+ },
1046
+ ],
1047
+ },
1048
+ {
1049
+ surfaceId: "workflow",
1050
+ providerTerms: ["Agent Skills", "Workflows"],
1051
+ scopes: ["workspace", "user", "plugin"],
1052
+ sourceIds: ["antigravity-skills", "antigravity-rules-workflows"],
1053
+ artifacts: [
1054
+ {
1055
+ key: "workspace-skill",
1056
+ path: ".agents/skills/<skill-name>/SKILL.md",
1057
+ scopes: ["workspace"],
1058
+ },
1059
+ {
1060
+ key: "user-skill",
1061
+ path: "~/.gemini/config/skills/<skill-name>/SKILL.md",
1062
+ scopes: ["user"],
1063
+ },
1064
+ {
1065
+ key: "legacy-workspace-skill",
1066
+ path: ".agent/skills/<skill-name>/SKILL.md",
1067
+ scopes: ["workspace", "compatibility"],
1068
+ status: "compatible",
1069
+ },
1070
+ ],
1071
+ },
1072
+ {
1073
+ surfaceId: "delegated_agent",
1074
+ providerTerms: ["asynchronous subagent", "dynamic custom subagent"],
1075
+ scopes: ["workspace", "conversation"],
1076
+ sourceIds: ["antigravity-subagents"],
1077
+ artifacts: [],
1078
+ fact: "Official documentation identifies conversation-scoped delegated agents without a persistent custom-agent artifact.",
1079
+ },
1080
+ {
1081
+ surfaceId: "enforcement",
1082
+ providerTerms: ["Hooks"],
1083
+ scopes: ["workspace", "user", "plugin"],
1084
+ sourceIds: ["antigravity-hooks"],
1085
+ artifacts: [
1086
+ {
1087
+ key: "workspace-hooks",
1088
+ path: ".agents/hooks.json",
1089
+ scopes: ["workspace"],
1090
+ },
1091
+ {
1092
+ key: "user-hooks",
1093
+ path: "~/.gemini/config/hooks.json",
1094
+ scopes: ["user"],
1095
+ },
1096
+ ],
1097
+ },
1098
+ {
1099
+ surfaceId: "prompt",
1100
+ providerTerms: ["Workflows"],
1101
+ scopes: ["workspace", "user"],
1102
+ sourceIds: ["antigravity-rules-workflows"],
1103
+ artifacts: [],
1104
+ fact: "Official documentation identifies manually invoked Workflows without an explicit file-system path.",
1105
+ },
1106
+ {
1107
+ surfaceId: "connector",
1108
+ providerTerms: ["MCP"],
1109
+ scopes: ["workspace", "user", "plugin"],
1110
+ sourceIds: ["antigravity-mcp"],
1111
+ artifacts: [
1112
+ {
1113
+ key: "workspace-mcp",
1114
+ path: ".agents/mcp_config.json",
1115
+ scopes: ["workspace"],
1116
+ },
1117
+ {
1118
+ key: "user-mcp",
1119
+ path: "~/.gemini/config/mcp_config.json",
1120
+ scopes: ["user"],
1121
+ },
1122
+ ],
1123
+ },
1124
+ ]),
1125
+ ];
1126
+ function compareSources(left, right) {
1127
+ return (AGENT_GUIDANCE_PROVIDER_IDS.indexOf(left.providerId) -
1128
+ AGENT_GUIDANCE_PROVIDER_IDS.indexOf(right.providerId) ||
1129
+ compareAgentGuidanceUtf8(left.sourceId, right.sourceId));
1130
+ }
1131
+ function deepFreeze(value) {
1132
+ if (typeof value !== "object" || value === null || Object.isFrozen(value)) {
1133
+ return value;
1134
+ }
1135
+ for (const child of Object.values(value)) {
1136
+ deepFreeze(child);
1137
+ }
1138
+ return Object.freeze(value);
1139
+ }
1140
+ export const AGENT_GUIDANCE_PROFILE_V1 = deepFreeze({
1141
+ schemaVersion: "Perttool.AgentGuidanceProfile.v1",
1142
+ profileDataVersion: 1,
1143
+ guidanceTaxonomyVersion: 1,
1144
+ riskTaxonomyVersion: 1,
1145
+ descriptionRegistryVersion: 1,
1146
+ descriptionLocale: "en",
1147
+ stalenessPolicyVersion: 1,
1148
+ snapshotAsOf: SNAPSHOT_AS_OF,
1149
+ providerOrder: AGENT_GUIDANCE_PROVIDER_IDS,
1150
+ surfaceOrder: AGENT_GUIDANCE_SURFACE_IDS,
1151
+ aliases: [{ alias: "grok", providerId: "grok-build" }],
1152
+ providers,
1153
+ guidanceRegistry: AGENT_GUIDANCE_GUIDANCE_REGISTRY_V1,
1154
+ riskRegistry: AGENT_GUIDANCE_RISK_REGISTRY_V1,
1155
+ sources: [...sources].sort(compareSources),
1156
+ });
1157
+ export const AGENT_GUIDANCE_SNAPSHOT_V1 = createAgentGuidanceProfileSnapshot(AGENT_GUIDANCE_PROFILE_V1);
1158
+ //# sourceMappingURL=profile.js.map