Expose workspace data to the agent and curate its authoring guides
Check named public GraphQL documents against the serving installation using the existing compiler, linker and authorized snapshot interpreter. Keep listObjects as a convenience over workspace-root queries, with no separate filter language. Bound compilation/results, cache by content and serving plan, and fence cutovers. Share graph discovery and reads between qx-workspace graph and the gardener's workspace_graph tool. Local authoring shells discover the live endpoint through the private control socket; configured public mounts also support direct clients. Fix pending paginated inspections to wait for their confirmed window, and retain semantic integration assertions instead of locking a server ticket's shape. Replace the long prompt with a 384-word entry point and five focused guides. Build immutable bundles with profiles, deep links, source hashes and word/link checks. Keep the docs-maintenance process and feedback outside agent guidance. Running agents use current guides while authored source and checker pins remain. Validation: nix fmt; nix fmt -- --check; nix run .#lint; existing CLI checks; protocol/client/coordinator build tests; complete Studio integration; 13 agent unit tests. A real GPT-6.1 Sol medium/priority turn summarized two synthetic saved comments and a document draft in 27.7s without source changes or cutover. Live reads also succeeded after an ordinary check/activation in the retained fixture.
This commit is contained in:
+16
-2
@@ -32,14 +32,28 @@ export interface LinkedQuery {
|
||||
}
|
||||
|
||||
/** Link every possible implementation, including atoms absent from today's data. */
|
||||
export function linkQueries(workspace: WorkspaceRevision): LinkedQuery[] {
|
||||
export function linkQueries(
|
||||
workspace: WorkspaceRevision,
|
||||
additional: readonly {
|
||||
packageRevisionId: string;
|
||||
checked: CheckedQuery;
|
||||
}[] = [],
|
||||
): LinkedQuery[] {
|
||||
const interfaces = new Map(workspace.interfaceImports.map((entry) => [entry.revisionId, entry]));
|
||||
const attachments = [
|
||||
...workspace.sharedAttachments,
|
||||
...workspace.conformances.flatMap((entry) => entry.privateAttachments),
|
||||
];
|
||||
const linked: LinkedQuery[] = [];
|
||||
for (const pkg of workspace.packageImports)
|
||||
for (const pkg of [
|
||||
...workspace.packageImports,
|
||||
...additional.map(({ packageRevisionId, checked }) => ({
|
||||
revisionId: packageRevisionId,
|
||||
displayName: "Public query",
|
||||
queries: [checked.declaration],
|
||||
checkedQueries: [checked],
|
||||
})),
|
||||
])
|
||||
for (const declaration of pkg.queries ?? []) {
|
||||
const checked = pkg.checkedQueries?.find((query) => query.declaration.id === declaration.id);
|
||||
if (!checked || JSON.stringify(checked.declaration) !== JSON.stringify(declaration))
|
||||
|
||||
Reference in New Issue
Block a user