glean-upgrade-migration
Check Glean developer changelog for API changes. Trigger: "glean upgrade migration", "upgrade-migration".
What this skill does
# Glean Upgrade & Migration
## Overview
Glean is an enterprise search platform that indexes documents across SaaS tools via connectors and exposes Search and Indexing APIs. Migrations involve connector schema changes, search API response format updates, and document permission model upgrades. Tracking API versions is critical because Glean's Indexing API enforces document schema validation — adding required fields or changing permission structures in a new version will cause bulk indexing failures and stale search results if connectors are not updated in lockstep.
## Version Detection
```typescript
const GLEAN_BASE = "https://your-domain-be.glean.com/api";
async function detectGleanApiVersion(apiToken: string): Promise<void> {
// Check indexing API health and version
const indexRes = await fetch(`${GLEAN_BASE}/index/v1/status`, {
headers: { Authorization: `Bearer ${apiToken}`, "Content-Type": "application/json" },
});
const indexStatus = await indexRes.json();
console.log(`Indexing API version: ${indexRes.headers.get("x-glean-api-version") ?? "v1"}`);
console.log(`Connector status: ${JSON.stringify(indexStatus.connectors)}`);
// Check search API for deprecated query parameters
const searchRes = await fetch(`${GLEAN_BASE}/client/v1/search`, {
method: "POST",
headers: { Authorization: `Bearer ${apiToken}`, "Content-Type": "application/json" },
body: JSON.stringify({ query: "test", pageSize: 1 }),
});
const deprecationHeader = searchRes.headers.get("x-glean-deprecated-params");
if (deprecationHeader) console.warn(`Deprecated parameters: ${deprecationHeader}`);
}
```
## Migration Checklist
- [ ] Review Glean developer changelog for Indexing API schema changes
- [ ] Audit custom connectors for deprecated document fields
- [ ] Verify `objectType` definitions match current Glean schema requirements
- [ ] Check if new required fields were added to document permission model
- [ ] Test search API response parsing — `results[].snippets` format may change
- [ ] Update datasource configuration if connector authentication method changed
- [ ] Validate bulk indexing with a small document batch before full re-index
- [ ] Check `people` API for identity resolution field changes
- [ ] Update search query syntax if faceted search operators were modified
- [ ] Monitor indexing error dashboard for 48 hours post-migration
## Schema Migration
```typescript
// Glean document schema evolved: flat permissions → structured ACL model
interface OldGleanDocument {
id: string;
datasource: string;
title: string;
body: { mimeType: string; textContent: string };
permissions: { allowedUsers: string[] };
updatedAt: string;
}
interface NewGleanDocument {
id: string;
datasource: string;
title: string;
body: { mimeType: string; textContent: string };
permissions: {
allowedUsers: Array<{ email: string; datasourceUserId?: string }>;
allowedGroups: Array<{ name: string; datasourceGroupId?: string }>;
allowAnonymousAccess: boolean;
};
viewURL: string;
updatedAt: string;
}
function migrateDocument(old: OldGleanDocument): NewGleanDocument {
return {
...old,
permissions: {
allowedUsers: old.permissions.allowedUsers.map((email) => ({ email })),
allowedGroups: [],
allowAnonymousAccess: false,
},
viewURL: `https://app.example.com/doc/${old.id}`,
};
}
```
## Rollback Strategy
```typescript
class GleanIndexClient {
constructor(
private token: string,
private baseUrl: string,
private apiVersion: "v1" | "v2" = "v2"
) {}
async indexDocuments(docs: any[]): Promise<any> {
try {
const res = await fetch(`${this.baseUrl}/index/${this.apiVersion}/indexdocuments`, {
method: "POST",
headers: { Authorization: `Bearer ${this.token}`, "Content-Type": "application/json" },
body: JSON.stringify({ documents: docs }),
});
if (!res.ok) throw new Error(`Glean indexing ${res.status}: ${await res.text()}`);
return await res.json();
} catch (err) {
if (this.apiVersion === "v2") {
console.warn("Falling back to Glean Indexing API v1");
this.apiVersion = "v1";
return this.indexDocuments(docs);
}
throw err;
}
}
}
```
## Error Handling
| Migration Issue | Symptom | Fix |
|----------------|---------|-----|
| Document schema validation failure | `400` with `missing required field: viewURL` | Add `viewURL` to all documents before re-indexing |
| Permission model mismatch | Documents indexed but not searchable by expected users | Migrate flat `allowedUsers` strings to structured user objects |
| Connector auth expired | `401 Unauthorized` on bulk index | Rotate API token in Glean admin and update connector config |
| Search response format changed | Client crashes parsing `snippets` as string instead of array | Handle both `string` and `Snippet[]` return types |
| Datasource quota exceeded | `429` during bulk re-index | Implement rate limiting with exponential backoff per Glean docs |
## Resources
- [Glean Developer Portal](https://developers.glean.com/)
- [Indexing API](https://developers.glean.com/api-info/indexing/getting-started/overview)
- [Search API](https://developers.glean.com/api/client-api/search/overview)
- [Glean Changelog](https://developers.glean.com/changelog)
## Next Steps
For CI pipeline integration, see `glean-ci-integration`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.