@bluefly/openstandardagents 0.2.5-RC → 0.2.7
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/.github/ISSUE_TEMPLATE/bug_report.yml +63 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +40 -0
- package/.github/workflows/dependabot-comment.yml +34 -0
- package/.github/workflows/pr-comment.yml +33 -0
- package/.husky/pre-commit +5 -0
- package/.kiro/config.json +21 -0
- package/.kiro/settings/mcp.json +61 -0
- package/.kiro/specs/scripts-migration-api-first/design.md +883 -0
- package/.kiro/specs/scripts-migration-api-first/requirements.md +165 -0
- package/.kiro/specs/scripts-migration-api-first/tasks.md +539 -0
- package/.kiro/specs/{website-design-audit → website-brand-identity}/design.md +381 -0
- package/.kiro/specs/{website-design-audit → website-brand-identity}/requirements.md +88 -0
- package/.kiro/specs/website-brand-identity/tasks.md +981 -0
- package/CHANGELOG.md +23 -0
- package/README.md +12 -3
- package/bin/ossa-dev +42 -0
- package/bin/ossa-export +32 -0
- package/bin/ossa-generate +60 -0
- package/bin/ossa-health +40 -0
- package/bin/ossa-init +26 -0
- package/dist/repositories/schema.repository.d.ts.map +1 -1
- package/dist/repositories/schema.repository.js +15 -10
- package/dist/repositories/schema.repository.js.map +1 -1
- package/dist/services/github-sync/github-client.d.ts +14 -0
- package/dist/services/github-sync/github-client.d.ts.map +1 -0
- package/dist/services/github-sync/github-client.js +41 -0
- package/dist/services/github-sync/github-client.js.map +1 -0
- package/dist/services/github-sync/gitlab-client.d.ts +17 -0
- package/dist/services/github-sync/gitlab-client.d.ts.map +1 -0
- package/dist/services/github-sync/gitlab-client.js +42 -0
- package/dist/services/github-sync/gitlab-client.js.map +1 -0
- package/dist/services/github-sync/schemas.d.ts +46 -0
- package/dist/services/github-sync/schemas.d.ts.map +1 -0
- package/dist/services/github-sync/schemas.js +36 -0
- package/dist/services/github-sync/schemas.js.map +1 -0
- package/dist/services/github-sync/sync.service.d.ts +27 -0
- package/dist/services/github-sync/sync.service.d.ts.map +1 -0
- package/dist/services/github-sync/sync.service.js +99 -0
- package/dist/services/github-sync/sync.service.js.map +1 -0
- package/dist/services/runtime/claude/capability-mapper.d.ts +84 -0
- package/dist/services/runtime/claude/capability-mapper.d.ts.map +1 -0
- package/dist/services/runtime/claude/capability-mapper.js +245 -0
- package/dist/services/runtime/claude/capability-mapper.js.map +1 -0
- package/dist/services/runtime/claude/claude-adapter.d.ts +80 -0
- package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -0
- package/dist/services/runtime/claude/claude-adapter.js +287 -0
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -0
- package/dist/services/runtime/claude/manifest-parser.d.ts +77 -0
- package/dist/services/runtime/claude/manifest-parser.d.ts.map +1 -0
- package/dist/services/runtime/claude/manifest-parser.js +169 -0
- package/dist/services/runtime/claude/manifest-parser.js.map +1 -0
- package/dist/services/runtime/claude/types.d.ts +115 -0
- package/dist/services/runtime/claude/types.d.ts.map +1 -0
- package/dist/services/runtime/claude/types.js +6 -0
- package/dist/services/runtime/claude/types.js.map +1 -0
- package/dist/services/validation.service.d.ts.map +1 -1
- package/dist/services/validation.service.js +12 -1
- package/dist/services/validation.service.js.map +1 -1
- package/dist/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
- package/dist/spec/v0.2.6/CHANGELOG.md +401 -0
- package/dist/spec/v0.2.6/README.md +72 -0
- package/dist/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/dist/spec/v0.2.6/ossa-0.2.6.schema.json +1786 -0
- package/dist/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
- package/dist/spec/v0.2.6-dev/CHANGELOG.md +164 -0
- package/dist/spec/v0.2.6-dev/README.md +75 -0
- package/dist/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
- package/dist/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/{v0.2.4/ossa-0.2.4-dev.schema.json → v0.2.6-dev/ossa-0.2.5.schema.json} +9 -9
- package/dist/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
- package/{spec/v0.2.4/ossa-0.2.4-dev.schema.json → dist/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json} +9 -9
- package/dist/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
- package/dist/spec/v0.2.7/core/agentgraph.md +324 -0
- package/dist/spec/v0.2.7/resources/agentgraph.yaml +135 -0
- package/docs/brand-guide/01-brand-overview.md +37 -0
- package/docs/brand-guide/02-logo-usage.md +43 -0
- package/docs/brand-guide/03-color-palette.md +70 -0
- package/docs/brand-guide/04-typography.md +82 -0
- package/docs/brand-guide/05-voice-and-tone.md +108 -0
- package/docs/brand-guide/06-visual-elements.md +137 -0
- package/docs/brand-guide/07-application-examples.md +153 -0
- package/docs/brand-guide/OssaLogo/OssA_Logo.svg +21 -0
- package/docs/brand-guide/OssaLogo/brand.af +0 -0
- package/docs/brand-guide/README.md +107 -0
- package/docs/comparison.md +315 -0
- package/docs/operations/automation-roadmap.md +245 -0
- package/docs/operations/github-sync-strategy.md +357 -0
- package/examples/anthropic/claude-assistant.ossa.json +5 -4
- package/examples/autogen/multi-agent.ossa.json +6 -4
- package/examples/crewai/research-team.ossa.json +14 -5
- package/examples/cursor/code-review-agent.ossa.json +21 -6
- package/examples/langchain/chain-agent.ossa.json +21 -5
- package/examples/langflow/workflow-agent.ossa.json +2 -3
- package/examples/langgraph/state-machine-agent.ossa.json +2 -3
- package/examples/llamaindex/rag-agent.ossa.json +2 -3
- package/examples/openai/multi-tool-agent.ossa.json +32 -9
- package/examples/openai/swarm-agent.ossa.json +18 -5
- package/examples/vercel/edge-agent.ossa.json +5 -4
- package/openapi/github-sync.yaml +115 -0
- package/package.json +25 -4
- package/scripts/README.md +103 -0
- package/scripts/auto-rebase-mrs.ts +106 -0
- package/scripts/batch-dependabot.sh +57 -0
- package/scripts/configure-gitlab-branch-protection.ts +95 -0
- package/scripts/create-issue-helper.ts +238 -0
- package/scripts/create-milestone-issue.ts +73 -0
- package/scripts/fix-schema-formats.js +82 -0
- package/scripts/generate-agents-catalog.ts +77 -0
- package/scripts/generate-api-docs.ts +218 -0
- package/scripts/generate-cli-docs.ts +410 -0
- package/scripts/generate-config-docs.ts +109 -0
- package/scripts/generate-errors-docs.ts +76 -0
- package/scripts/generate-examples-docs.ts +99 -0
- package/scripts/generate-schema-docs.ts +296 -0
- package/scripts/generate-types-docs.ts +48 -0
- package/scripts/lowercase-docs.ts +43 -0
- package/scripts/manage-milestone-mrs.ts +279 -0
- package/scripts/rebase-all-mrs.sh +75 -0
- package/scripts/sync-github-pr.sh +48 -0
- package/scripts/sync-version.js +40 -0
- package/scripts/sync-wiki.sh +50 -0
- package/scripts/validate-all.js +127 -0
- package/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
- package/spec/v0.2.6/CHANGELOG.md +401 -0
- package/spec/v0.2.6/README.md +72 -0
- package/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/spec/v0.2.6/ossa-0.2.6.schema.json +1786 -0
- package/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
- package/spec/v0.2.6-dev/CHANGELOG.md +164 -0
- package/spec/v0.2.6-dev/README.md +75 -0
- package/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
- package/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.6-dev/ossa-0.2.5.schema.json +1696 -0
- package/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
- package/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json +1696 -0
- package/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
- package/spec/v0.2.7/core/agentgraph.md +324 -0
- package/spec/v0.2.7/resources/agentgraph.yaml +135 -0
- package/website/DESIGN_SYSTEM_IMPLEMENTATION.md +445 -0
- package/website/app/about/page.tsx +53 -44
- package/website/app/ecosystem/page.tsx +146 -111
- package/website/app/globals.scss +256 -21
- package/website/app/page.tsx +394 -182
- package/website/app/page.tsx.bak +679 -0
- package/website/app/page.tsx.bak2 +649 -0
- package/website/app/schema/page.tsx +3 -3
- package/website/app/specification/page.tsx +1 -1
- package/website/components/layout/Header.tsx +27 -23
- package/website/components/ui/Badge.tsx +82 -0
- package/website/components/ui/Button.tsx +116 -0
- package/website/components/ui/Card.tsx +167 -0
- package/website/components/ui/Checkbox.tsx +141 -0
- package/website/components/ui/Input.tsx +169 -0
- package/website/components/ui/Radio.tsx +141 -0
- package/website/components/ui/Select.tsx +182 -0
- package/website/components/ui/Tag.tsx +158 -0
- package/website/components/ui/Textarea.tsx +195 -0
- package/website/components/ui/index.ts +11 -0
- package/website/content/docs/{00-HOME.md → 00-home.md} +1 -1
- package/website/content/docs/agents/catalog.md +28 -0
- package/website/content/docs/{AIFlow-Framework-Integration-with-OSSA.md → aiflow-framework-integration-with-ossa.md} +2 -2
- package/website/content/docs/api-reference/index.md +38 -0
- package/website/content/docs/api-reference/ossa-core-api.md +634 -0
- package/website/content/docs/api-reference/ossa-registry-api.md +515 -0
- package/website/content/docs/api-reference/unified-agent-gateway.md +599 -0
- package/website/content/docs/cli-reference/index.md +111 -0
- package/website/content/docs/cli-reference/ossa-agents.md +70 -0
- package/website/content/docs/cli-reference/ossa-export.md +56 -0
- package/website/content/docs/cli-reference/ossa-generate.md +66 -0
- package/website/content/docs/cli-reference/ossa-gitlab-agent.md +57 -0
- package/website/content/docs/cli-reference/ossa-import.md +56 -0
- package/website/content/docs/cli-reference/ossa-init.md +57 -0
- package/website/content/docs/cli-reference/ossa-migrate.md +62 -0
- package/website/content/docs/cli-reference/ossa-run.md +66 -0
- package/website/content/docs/cli-reference/ossa-schema.md +57 -0
- package/website/content/docs/cli-reference/ossa-setup.md +57 -0
- package/website/content/docs/cli-reference/ossa-validate.md +66 -0
- package/website/content/docs/configuration/index.md +97 -0
- package/website/content/docs/deployment/github-mirroring.md +924 -0
- package/website/content/docs/documentation.md +100 -0
- package/website/content/docs/ecosystem/framework-support.md +551 -9
- package/website/content/docs/errors/index.md +10 -0
- package/website/content/docs/examples/{AIFlow-Framework-Integration-with-OSSA.md → aiflow-framework-integration-with-ossa.md} +2 -2
- package/website/content/docs/examples/catalog.md +300 -0
- package/website/content/docs/for-audiences/{Students-Researchers.md → students-researchers.md} +1 -1
- package/website/content/docs/getting-started/{Installation.md → installation.md} +1 -1
- package/website/content/docs/getting-started.md +1 -1
- package/website/content/docs/integrations/aiflow.md +2 -2
- package/website/content/docs/migration-guides/anthropic-mcp-to-ossa.md +5 -5
- package/website/content/docs/migration-guides/crewai-to-ossa.md +3 -3
- package/website/content/docs/migration-guides/drupal-eca-to-ossa.md +7 -7
- package/website/content/docs/migration-guides/langchain-to-ossa.md +4 -4
- package/website/content/docs/openapi-extensions/index.md +1 -1
- package/website/content/docs/ossa-compliant-badge.md +1 -1
- package/website/content/docs/pre-release/index.md +5 -5
- package/website/content/docs/releases/v0.2.6.md +99 -0
- package/website/content/docs/schema-reference/agent-capabilities.md +50 -0
- package/website/content/docs/schema-reference/agent-id.md +52 -0
- package/website/content/docs/schema-reference/agent-name.md +50 -0
- package/website/content/docs/schema-reference/agent-role.md +54 -0
- package/website/content/docs/schema-reference/agent-version.md +50 -0
- package/website/content/docs/schema-reference/index.md +26 -157
- package/website/content/docs/types-reference/index.md +105 -0
- package/website/content/docs/versioning.md +3 -3
- package/website/dev.sh +53 -0
- package/website/docker-compose.dev.yml +36 -0
- package/website/lib/version.ts +1 -1
- package/website/lib/versions.json +45 -20
- package/website/package.json +1 -1
- package/website/styles/_spacing.scss +453 -0
- package/website/styles/_tokens.scss +245 -0
- package/website/styles/_typography.scss +361 -0
- package/website/styles/_variables.scss +270 -19
- package/website/tailwind.config.ts +113 -79
- package/.kiro/specs/agent-buildkit-templates/design.md +0 -495
- package/.kiro/specs/agent-buildkit-templates/requirements.md +0 -165
- package/.kiro/specs/kiro-ide-supercharger/README.md +0 -202
- package/.kiro/specs/kiro-ide-supercharger/design.md +0 -1005
- package/.kiro/specs/kiro-ide-supercharger/requirements.md +0 -141
- package/.kiro/specs/kiro-ide-supercharger/tasks.md +0 -507
- package/docs/issue-19-completion-summary.md +0 -648
- package/docs/issue-19-validation.md +0 -351
- package/website/content/docs/Examples.md +0 -71
- package/website/content/docs/OpenAPI-Extensions.md +0 -934
- package/website/content/docs/core-concepts/Project-Structure.md +0 -348
- package/website/content/docs/examples/Migration-Guides.md +0 -214
- package/website/content/docs/for-audiences/Architects.md +0 -224
- package/website/content/docs/for-audiences/Developers.md +0 -220
- package/website/content/docs/for-audiences/Enterprises.md +0 -256
- package/website/content/docs/getting-started/5-Minute-Overview.md +0 -85
- package/website/content/docs/getting-started/First-Agent.md +0 -196
- package/website/content/docs/getting-started/Hello-World.md +0 -184
- package/website/content/docs/migration-guides/00-INDEX.md +0 -76
- package/website/content/docs/migration-guides/README.md +0 -133
- /package/dist/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
- /package/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Generate schema documentation from JSON Schema
|
|
4
|
+
*
|
|
5
|
+
* Usage: npm run docs:schema:generate
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
10
|
+
|
|
11
|
+
interface SchemaProperty {
|
|
12
|
+
type: string | string[];
|
|
13
|
+
description?: string;
|
|
14
|
+
format?: string;
|
|
15
|
+
pattern?: string;
|
|
16
|
+
enum?: string[];
|
|
17
|
+
minimum?: number;
|
|
18
|
+
maximum?: number;
|
|
19
|
+
minLength?: number;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
required?: boolean;
|
|
22
|
+
default?: any;
|
|
23
|
+
examples?: any[];
|
|
24
|
+
properties?: Record<string, SchemaProperty>;
|
|
25
|
+
items?: SchemaProperty;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SPEC_DIR = join(process.cwd(), 'spec/v0.2.5-RC');
|
|
29
|
+
const OUTPUT_DIR = join(process.cwd(), 'website/content/docs/schema-reference');
|
|
30
|
+
|
|
31
|
+
// Field documentation metadata
|
|
32
|
+
const FIELD_DOCS: Record<string, {
|
|
33
|
+
why: string;
|
|
34
|
+
how: string;
|
|
35
|
+
where: string;
|
|
36
|
+
examples: string[];
|
|
37
|
+
relatedFields: string[];
|
|
38
|
+
relatedDocs: string[];
|
|
39
|
+
}> = {
|
|
40
|
+
'agent.id': {
|
|
41
|
+
why: 'Unique identifier for agent registration, API routing, and inter-agent communication',
|
|
42
|
+
how: 'Use DNS-1123 subdomain format: lowercase alphanumeric with hyphens, max 63 chars',
|
|
43
|
+
where: 'Used in API endpoints (/agents/{id}), Kubernetes resources, and registry URLs',
|
|
44
|
+
examples: [
|
|
45
|
+
'my-agent',
|
|
46
|
+
'data-processor-v2',
|
|
47
|
+
'compliance-checker-prod'
|
|
48
|
+
],
|
|
49
|
+
relatedFields: ['agent.name', 'agent.version', 'agent.role'],
|
|
50
|
+
relatedDocs: ['../cli-reference/ossa-validate.md', '../api-reference/core-api.md']
|
|
51
|
+
},
|
|
52
|
+
'agent.name': {
|
|
53
|
+
why: 'Human-readable name for display in UIs and documentation',
|
|
54
|
+
how: 'Use descriptive names that clearly indicate the agent\'s purpose',
|
|
55
|
+
where: 'Displayed in agent lists, dashboards, and documentation',
|
|
56
|
+
examples: [
|
|
57
|
+
'Data Processing Agent',
|
|
58
|
+
'Compliance Checker',
|
|
59
|
+
'Customer Support Bot'
|
|
60
|
+
],
|
|
61
|
+
relatedFields: ['agent.id', 'agent.description'],
|
|
62
|
+
relatedDocs: ['../guides/creating-agents.md']
|
|
63
|
+
},
|
|
64
|
+
'agent.version': {
|
|
65
|
+
why: 'Track agent versions for compatibility, rollback, and change management',
|
|
66
|
+
how: 'Use semantic versioning (MAJOR.MINOR.PATCH)',
|
|
67
|
+
where: 'Used in registry, deployment manifests, and API responses',
|
|
68
|
+
examples: [
|
|
69
|
+
'1.0.0',
|
|
70
|
+
'2.1.3',
|
|
71
|
+
'0.1.0-beta'
|
|
72
|
+
],
|
|
73
|
+
relatedFields: ['agent.id', 'ossaVersion'],
|
|
74
|
+
relatedDocs: ['../guides/versioning.md']
|
|
75
|
+
},
|
|
76
|
+
'agent.role': {
|
|
77
|
+
why: 'Classify agents by their function in the system for routing and orchestration',
|
|
78
|
+
how: 'Choose from predefined roles or use custom roles',
|
|
79
|
+
where: 'Used for agent discovery, filtering, and orchestration patterns',
|
|
80
|
+
examples: [
|
|
81
|
+
'worker',
|
|
82
|
+
'orchestrator',
|
|
83
|
+
'compliance',
|
|
84
|
+
'monitor'
|
|
85
|
+
],
|
|
86
|
+
relatedFields: ['agent.capabilities', 'agent.taxonomy'],
|
|
87
|
+
relatedDocs: ['../architecture/multi-agent-systems.md']
|
|
88
|
+
},
|
|
89
|
+
'agent.capabilities': {
|
|
90
|
+
why: 'Define what the agent can do, enabling capability-based routing and discovery',
|
|
91
|
+
how: 'List all capabilities with input/output schemas and descriptions',
|
|
92
|
+
where: 'Used by orchestrators to route tasks and by registry for discovery',
|
|
93
|
+
examples: [
|
|
94
|
+
'process_data',
|
|
95
|
+
'validate_compliance',
|
|
96
|
+
'generate_report'
|
|
97
|
+
],
|
|
98
|
+
relatedFields: ['agent.tools', 'agent.role'],
|
|
99
|
+
relatedDocs: ['../guides/defining-capabilities.md']
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
function generateFieldDoc(fieldPath: string, property: SchemaProperty): string {
|
|
104
|
+
const metadata = FIELD_DOCS[fieldPath] || {
|
|
105
|
+
why: 'No documentation available',
|
|
106
|
+
how: 'No documentation available',
|
|
107
|
+
where: 'No documentation available',
|
|
108
|
+
examples: [],
|
|
109
|
+
relatedFields: [],
|
|
110
|
+
relatedDocs: []
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
let doc = `# ${fieldPath}\n\n`;
|
|
114
|
+
|
|
115
|
+
// Type and requirements
|
|
116
|
+
const typeStr = Array.isArray(property.type) ? property.type.join(' | ') : property.type;
|
|
117
|
+
doc += `**Type**: \`${typeStr}\`\n`;
|
|
118
|
+
doc += `**Required**: ${property.required ? 'Yes' : 'No'}\n`;
|
|
119
|
+
if (property.format) {
|
|
120
|
+
doc += `**Format**: ${property.format}\n`;
|
|
121
|
+
}
|
|
122
|
+
doc += '\n';
|
|
123
|
+
|
|
124
|
+
// Description
|
|
125
|
+
if (property.description) {
|
|
126
|
+
doc += `## Description\n\n${property.description}\n\n`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Why
|
|
130
|
+
doc += `## Why This Field Exists\n\n${metadata.why}\n\n`;
|
|
131
|
+
|
|
132
|
+
// How
|
|
133
|
+
doc += `## How to Use\n\n${metadata.how}\n\n`;
|
|
134
|
+
|
|
135
|
+
// Where
|
|
136
|
+
doc += `## Where It's Used\n\n${metadata.where}\n\n`;
|
|
137
|
+
|
|
138
|
+
// Format requirements
|
|
139
|
+
if (property.pattern) {
|
|
140
|
+
doc += `## Format Requirements\n\n`;
|
|
141
|
+
doc += `Must match pattern: \`${property.pattern}\`\n\n`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (property.enum) {
|
|
145
|
+
doc += `## Allowed Values\n\n`;
|
|
146
|
+
for (const value of property.enum) {
|
|
147
|
+
doc += `- \`${value}\`\n`;
|
|
148
|
+
}
|
|
149
|
+
doc += '\n';
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (property.minimum !== undefined || property.maximum !== undefined) {
|
|
153
|
+
doc += `## Constraints\n\n`;
|
|
154
|
+
if (property.minimum !== undefined) {
|
|
155
|
+
doc += `- Minimum: ${property.minimum}\n`;
|
|
156
|
+
}
|
|
157
|
+
if (property.maximum !== undefined) {
|
|
158
|
+
doc += `- Maximum: ${property.maximum}\n`;
|
|
159
|
+
}
|
|
160
|
+
doc += '\n';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (property.minLength !== undefined || property.maxLength !== undefined) {
|
|
164
|
+
doc += `## Length Constraints\n\n`;
|
|
165
|
+
if (property.minLength !== undefined) {
|
|
166
|
+
doc += `- Minimum length: ${property.minLength}\n`;
|
|
167
|
+
}
|
|
168
|
+
if (property.maxLength !== undefined) {
|
|
169
|
+
doc += `- Maximum length: ${property.maxLength}\n`;
|
|
170
|
+
}
|
|
171
|
+
doc += '\n';
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Examples
|
|
175
|
+
if (metadata.examples.length > 0) {
|
|
176
|
+
doc += `## Examples\n\n`;
|
|
177
|
+
for (const example of metadata.examples) {
|
|
178
|
+
doc += `\`\`\`yaml\n${fieldPath}: ${example}\n\`\`\`\n\n`;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Validation
|
|
183
|
+
doc += `## Validation\n\n`;
|
|
184
|
+
doc += `\`\`\`bash\nossa validate agent.ossa.yaml\n\`\`\`\n\n`;
|
|
185
|
+
|
|
186
|
+
// Related fields
|
|
187
|
+
if (metadata.relatedFields.length > 0) {
|
|
188
|
+
doc += `## Related Fields\n\n`;
|
|
189
|
+
for (const field of metadata.relatedFields) {
|
|
190
|
+
const filename = field.replace(/\./g, '-') + '.md';
|
|
191
|
+
doc += `- [${field}](./${filename})\n`;
|
|
192
|
+
}
|
|
193
|
+
doc += '\n';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Related documentation
|
|
197
|
+
if (metadata.relatedDocs.length > 0) {
|
|
198
|
+
doc += `## Related Documentation\n\n`;
|
|
199
|
+
for (const docLink of metadata.relatedDocs) {
|
|
200
|
+
doc += `- [${docLink.split('/').pop()?.replace('.md', '')}](${docLink})\n`;
|
|
201
|
+
}
|
|
202
|
+
doc += '\n';
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return doc;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function main() {
|
|
209
|
+
console.log('🚀 Generating schema documentation...\n');
|
|
210
|
+
|
|
211
|
+
// Create output directory
|
|
212
|
+
mkdirSync(OUTPUT_DIR, { recursive: true });
|
|
213
|
+
|
|
214
|
+
// Read schema
|
|
215
|
+
const schemaPath = join(SPEC_DIR, 'ossa-0.2.5-RC.schema.json');
|
|
216
|
+
const schemaContent = readFileSync(schemaPath, 'utf-8');
|
|
217
|
+
const schema = JSON.parse(schemaContent);
|
|
218
|
+
|
|
219
|
+
console.log(`📁 Processing schema fields...\n`);
|
|
220
|
+
|
|
221
|
+
// Generate documentation for documented fields
|
|
222
|
+
let count = 0;
|
|
223
|
+
for (const [fieldPath, metadata] of Object.entries(FIELD_DOCS)) {
|
|
224
|
+
// Create a mock property for now (in real implementation, extract from schema)
|
|
225
|
+
const property: SchemaProperty = {
|
|
226
|
+
type: 'string',
|
|
227
|
+
description: `The ${fieldPath} field`,
|
|
228
|
+
required: true
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
const docContent = generateFieldDoc(fieldPath, property);
|
|
232
|
+
const filename = fieldPath.replace(/\./g, '-') + '.md';
|
|
233
|
+
const outputFile = join(OUTPUT_DIR, filename);
|
|
234
|
+
|
|
235
|
+
writeFileSync(outputFile, docContent);
|
|
236
|
+
console.log(`✅ Generated: ${filename}`);
|
|
237
|
+
count++;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Generate index
|
|
241
|
+
const indexContent = `# Schema Reference
|
|
242
|
+
|
|
243
|
+
Complete reference for the OSSA agent manifest schema.
|
|
244
|
+
|
|
245
|
+
## Overview
|
|
246
|
+
|
|
247
|
+
The OSSA schema defines the structure of agent manifests. Every field serves a specific purpose in the agent lifecycle.
|
|
248
|
+
|
|
249
|
+
## Core Fields
|
|
250
|
+
|
|
251
|
+
### Agent Identification
|
|
252
|
+
- [agent.id](./agent-id.md) - Unique agent identifier
|
|
253
|
+
- [agent.name](./agent-name.md) - Human-readable name
|
|
254
|
+
- [agent.version](./agent-version.md) - Semantic version
|
|
255
|
+
- [agent.role](./agent-role.md) - Agent role classification
|
|
256
|
+
|
|
257
|
+
### Agent Capabilities
|
|
258
|
+
- [agent.capabilities](./agent-capabilities.md) - What the agent can do
|
|
259
|
+
|
|
260
|
+
## Schema Versions
|
|
261
|
+
|
|
262
|
+
- **Current**: v0.2.5-RC
|
|
263
|
+
- **Stable**: v0.2.4
|
|
264
|
+
- **Previous**: v0.2.3, v0.2.2
|
|
265
|
+
|
|
266
|
+
See [Versioning Guide](../guides/versioning.md) for migration information.
|
|
267
|
+
|
|
268
|
+
## Validation
|
|
269
|
+
|
|
270
|
+
Validate your agent manifests:
|
|
271
|
+
|
|
272
|
+
\`\`\`bash
|
|
273
|
+
ossa validate agent.ossa.yaml
|
|
274
|
+
\`\`\`
|
|
275
|
+
|
|
276
|
+
## Complete Schema
|
|
277
|
+
|
|
278
|
+
View the complete JSON Schema:
|
|
279
|
+
- [v0.2.5-RC Schema](https://github.com/blueflyio/openstandardagents/blob/main/spec/v0.2.5-RC/ossa-0.2.5-RC.schema.json)
|
|
280
|
+
|
|
281
|
+
## Related Documentation
|
|
282
|
+
|
|
283
|
+
- [CLI Reference](../cli-reference/index.md)
|
|
284
|
+
- [API Reference](../api-reference/index.md)
|
|
285
|
+
- [Creating Agents Guide](../guides/creating-agents.md)
|
|
286
|
+
`;
|
|
287
|
+
|
|
288
|
+
writeFileSync(join(OUTPUT_DIR, 'index.md'), indexContent);
|
|
289
|
+
console.log(`✅ Generated: index.md`);
|
|
290
|
+
|
|
291
|
+
console.log(`\n✨ Schema documentation generated successfully!`);
|
|
292
|
+
console.log(`📂 Output: ${OUTPUT_DIR}`);
|
|
293
|
+
console.log(`📊 Fields documented: ${count}`);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
main();
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
import { readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
|
|
5
|
+
const TYPES_FILE = join(process.cwd(), 'src/types/index.ts');
|
|
6
|
+
const OUTPUT_FILE = join(process.cwd(), 'website/content/docs/types-reference/index.md');
|
|
7
|
+
|
|
8
|
+
const content = readFileSync(TYPES_FILE, 'utf-8');
|
|
9
|
+
|
|
10
|
+
// Extract interfaces and types
|
|
11
|
+
const interfaces = content.match(/export interface \w+[^}]+}/gs) || [];
|
|
12
|
+
const types = content.match(/export type \w+ = [^;]+;/gs) || [];
|
|
13
|
+
|
|
14
|
+
let doc = `# TypeScript Types Reference
|
|
15
|
+
|
|
16
|
+
Auto-generated from \`src/types/index.ts\`
|
|
17
|
+
|
|
18
|
+
## Interfaces
|
|
19
|
+
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
for (const iface of interfaces) {
|
|
23
|
+
const name = iface.match(/interface (\w+)/)?.[1];
|
|
24
|
+
if (name) {
|
|
25
|
+
doc += `### ${name}\n\n\`\`\`typescript\n${iface}\n\`\`\`\n\n`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
doc += `## Type Aliases\n\n`;
|
|
30
|
+
|
|
31
|
+
for (const type of types) {
|
|
32
|
+
const name = type.match(/type (\w+)/)?.[1];
|
|
33
|
+
if (name) {
|
|
34
|
+
doc += `### ${name}\n\n\`\`\`typescript\n${type}\n\`\`\`\n\n`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
doc += `## Usage
|
|
39
|
+
|
|
40
|
+
\`\`\`typescript
|
|
41
|
+
import { OSSAManifest, AgentSpec } from '@bluefly/openstandardagents';
|
|
42
|
+
\`\`\`
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
mkdirSync(join(process.cwd(), 'website/content/docs/types-reference'), { recursive: true });
|
|
46
|
+
writeFileSync(OUTPUT_FILE, doc);
|
|
47
|
+
|
|
48
|
+
console.log(`✅ Generated types reference: ${interfaces.length} interfaces, ${types.length} types`);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Convert all documentation filenames to lowercase
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { readdirSync, renameSync, statSync } from 'fs';
|
|
7
|
+
import { join, basename, dirname } from 'path';
|
|
8
|
+
|
|
9
|
+
const DOCS_DIR = join(process.cwd(), 'website/content/docs');
|
|
10
|
+
|
|
11
|
+
function lowercaseFiles(dir: string) {
|
|
12
|
+
const entries = readdirSync(dir);
|
|
13
|
+
|
|
14
|
+
for (const entry of entries) {
|
|
15
|
+
const fullPath = join(dir, entry);
|
|
16
|
+
const stat = statSync(fullPath);
|
|
17
|
+
|
|
18
|
+
if (stat.isDirectory()) {
|
|
19
|
+
// Recursively process subdirectories
|
|
20
|
+
lowercaseFiles(fullPath);
|
|
21
|
+
|
|
22
|
+
// Rename directory if needed
|
|
23
|
+
const lowerEntry = entry.toLowerCase();
|
|
24
|
+
if (entry !== lowerEntry) {
|
|
25
|
+
const newPath = join(dirname(fullPath), lowerEntry);
|
|
26
|
+
console.log(`📁 Renaming: ${entry} → ${lowerEntry}`);
|
|
27
|
+
renameSync(fullPath, newPath);
|
|
28
|
+
}
|
|
29
|
+
} else if (entry.endsWith('.md')) {
|
|
30
|
+
// Rename file if needed
|
|
31
|
+
const lowerEntry = entry.toLowerCase();
|
|
32
|
+
if (entry !== lowerEntry) {
|
|
33
|
+
const newPath = join(dirname(fullPath), lowerEntry);
|
|
34
|
+
console.log(`📄 Renaming: ${entry} → ${lowerEntry}`);
|
|
35
|
+
renameSync(fullPath, newPath);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
console.log('🔄 Converting documentation filenames to lowercase...\n');
|
|
42
|
+
lowercaseFiles(DOCS_DIR);
|
|
43
|
+
console.log('\n✅ Done!');
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Manage Merge Requests for a specific milestone
|
|
4
|
+
* Helps clean up and organize MRs for controlled releases
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Gitlab } from '@gitbeaker/node';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
|
|
10
|
+
const gitlab = new Gitlab({
|
|
11
|
+
token: process.env.GITLAB_TOKEN || process.env.GITLAB_ACCESS_TOKEN,
|
|
12
|
+
host: 'https://gitlab.com',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const PROJECT_ID = '76265294'; // blueflyio/openstandardagents
|
|
16
|
+
|
|
17
|
+
interface MRInfo {
|
|
18
|
+
iid: number;
|
|
19
|
+
title: string;
|
|
20
|
+
state: string;
|
|
21
|
+
target_branch: string;
|
|
22
|
+
source_branch: string;
|
|
23
|
+
milestone?: { title: string };
|
|
24
|
+
has_conflicts: boolean;
|
|
25
|
+
merge_status: string;
|
|
26
|
+
web_url: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function listMRsInMilestone(milestone: string) {
|
|
30
|
+
console.log(`\n📋 Listing MRs in milestone: ${milestone}\n`);
|
|
31
|
+
|
|
32
|
+
const mrs = await gitlab.MergeRequests.all({
|
|
33
|
+
projectId: PROJECT_ID,
|
|
34
|
+
state: 'opened',
|
|
35
|
+
milestone,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
if (mrs.length === 0) {
|
|
39
|
+
console.log('No open MRs found in this milestone.');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.log(`Found ${mrs.length} open MRs:\n`);
|
|
44
|
+
|
|
45
|
+
for (const mr of mrs) {
|
|
46
|
+
const status = mr.has_conflicts ? '❌ CONFLICTS' : '✅ Clean';
|
|
47
|
+
const target = mr.target_branch === 'development' ? '✅ dev' : `⚠️ ${mr.target_branch}`;
|
|
48
|
+
|
|
49
|
+
console.log(`!${mr.iid}: ${mr.title}`);
|
|
50
|
+
console.log(` Target: ${target} | Status: ${status}`);
|
|
51
|
+
console.log(` ${mr.web_url}\n`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function listMRsNotInMilestone(milestone: string) {
|
|
56
|
+
console.log(`\n📋 Listing open MRs NOT in milestone: ${milestone}\n`);
|
|
57
|
+
|
|
58
|
+
const allMRs = await gitlab.MergeRequests.all({
|
|
59
|
+
projectId: PROJECT_ID,
|
|
60
|
+
state: 'opened',
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const outsideMRs = allMRs.filter(
|
|
64
|
+
(mr: any) => !mr.milestone || mr.milestone.title !== milestone
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if (outsideMRs.length === 0) {
|
|
68
|
+
console.log('All open MRs are in the milestone.');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log(`Found ${outsideMRs.length} MRs outside milestone:\n`);
|
|
73
|
+
|
|
74
|
+
for (const mr of outsideMRs) {
|
|
75
|
+
const milestoneText = mr.milestone ? mr.milestone.title : 'No milestone';
|
|
76
|
+
console.log(`!${mr.iid}: ${mr.title}`);
|
|
77
|
+
console.log(` Milestone: ${milestoneText}`);
|
|
78
|
+
console.log(` Target: ${mr.target_branch}`);
|
|
79
|
+
console.log(` ${mr.web_url}\n`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function retargetMR(mrId: number, targetBranch: string) {
|
|
84
|
+
console.log(`\n🎯 Retargeting MR !${mrId} to ${targetBranch}...\n`);
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
await gitlab.MergeRequests.edit(PROJECT_ID, mrId, {
|
|
88
|
+
target_branch: targetBranch,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
console.log(`✅ Successfully retargeted MR !${mrId} to ${targetBranch}`);
|
|
92
|
+
} catch (error: any) {
|
|
93
|
+
console.error(`❌ Failed to retarget MR: ${error.message}`);
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function closeMR(mrId: number, reason: string) {
|
|
99
|
+
console.log(`\n🚫 Closing MR !${mrId}...\n`);
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
// Add comment explaining closure
|
|
103
|
+
await gitlab.MergeRequestNotes.create(PROJECT_ID, mrId, {
|
|
104
|
+
body: `Closing this MR: ${reason}\n\nIf this work is still needed, please rebase and assign to the appropriate milestone.`,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Close the MR
|
|
108
|
+
await gitlab.MergeRequests.edit(PROJECT_ID, mrId, {
|
|
109
|
+
state_event: 'close',
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
console.log(`✅ Successfully closed MR !${mrId}`);
|
|
113
|
+
} catch (error: any) {
|
|
114
|
+
console.error(`❌ Failed to close MR: ${error.message}`);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function rebaseMR(mrId: number) {
|
|
120
|
+
console.log(`\n🔄 Rebasing MR !${mrId}...\n`);
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
await gitlab.MergeRequests.rebase(PROJECT_ID, mrId);
|
|
124
|
+
console.log(`✅ Rebase initiated for MR !${mrId}`);
|
|
125
|
+
console.log(' Check the MR page for rebase status.');
|
|
126
|
+
} catch (error: any) {
|
|
127
|
+
console.error(`❌ Failed to rebase MR: ${error.message}`);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function assignMilestone(mrId: number, milestone: string) {
|
|
133
|
+
console.log(`\n🏷️ Assigning MR !${mrId} to milestone ${milestone}...\n`);
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
// Get milestone ID
|
|
137
|
+
const milestones = await gitlab.ProjectMilestones.all(PROJECT_ID);
|
|
138
|
+
const targetMilestone = milestones.find((m: any) => m.title === milestone);
|
|
139
|
+
|
|
140
|
+
if (!targetMilestone) {
|
|
141
|
+
throw new Error(`Milestone "${milestone}" not found`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
await gitlab.MergeRequests.edit(PROJECT_ID, mrId, {
|
|
145
|
+
milestone_id: targetMilestone.id,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
console.log(`✅ Successfully assigned MR !${mrId} to milestone ${milestone}`);
|
|
149
|
+
} catch (error: any) {
|
|
150
|
+
console.error(`❌ Failed to assign milestone: ${error.message}`);
|
|
151
|
+
process.exit(1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async function bulkRetarget(milestone: string, targetBranch: string) {
|
|
156
|
+
console.log(`\n🎯 Bulk retargeting all MRs in ${milestone} to ${targetBranch}...\n`);
|
|
157
|
+
|
|
158
|
+
const mrs = await gitlab.MergeRequests.all({
|
|
159
|
+
projectId: PROJECT_ID,
|
|
160
|
+
state: 'opened',
|
|
161
|
+
milestone,
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
console.log(`Found ${mrs.length} MRs to retarget\n`);
|
|
165
|
+
|
|
166
|
+
for (const mr of mrs) {
|
|
167
|
+
if (mr.target_branch !== targetBranch) {
|
|
168
|
+
console.log(`Retargeting !${mr.iid}: ${mr.title}`);
|
|
169
|
+
await retargetMR(mr.iid, targetBranch);
|
|
170
|
+
} else {
|
|
171
|
+
console.log(`Skipping !${mr.iid}: already targets ${targetBranch}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
console.log(`\n✅ Bulk retarget complete`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async function bulkRebase(milestone: string) {
|
|
179
|
+
console.log(`\n🔄 Bulk rebasing all MRs in ${milestone}...\n`);
|
|
180
|
+
|
|
181
|
+
const mrs = await gitlab.MergeRequests.all({
|
|
182
|
+
projectId: PROJECT_ID,
|
|
183
|
+
state: 'opened',
|
|
184
|
+
milestone,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
console.log(`Found ${mrs.length} MRs to rebase\n`);
|
|
188
|
+
|
|
189
|
+
for (const mr of mrs) {
|
|
190
|
+
if (mr.has_conflicts) {
|
|
191
|
+
console.log(`Rebasing !${mr.iid}: ${mr.title} (has conflicts)`);
|
|
192
|
+
await rebaseMR(mr.iid);
|
|
193
|
+
// Wait a bit between rebases
|
|
194
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
195
|
+
} else {
|
|
196
|
+
console.log(`Skipping !${mr.iid}: no conflicts`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
console.log(`\n✅ Bulk rebase complete`);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// CLI
|
|
204
|
+
const program = new Command();
|
|
205
|
+
|
|
206
|
+
program
|
|
207
|
+
.name('manage-milestone-mrs')
|
|
208
|
+
.description('Manage merge requests for milestone-based releases')
|
|
209
|
+
.version('1.0.0');
|
|
210
|
+
|
|
211
|
+
program
|
|
212
|
+
.command('list')
|
|
213
|
+
.description('List all MRs in a milestone')
|
|
214
|
+
.requiredOption('-m, --milestone <milestone>', 'Milestone name (e.g., v0.2.6)')
|
|
215
|
+
.action(async (options) => {
|
|
216
|
+
await listMRsInMilestone(options.milestone);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
program
|
|
220
|
+
.command('list-outside')
|
|
221
|
+
.description('List all MRs NOT in a milestone')
|
|
222
|
+
.requiredOption('-m, --milestone <milestone>', 'Milestone name (e.g., v0.2.6)')
|
|
223
|
+
.action(async (options) => {
|
|
224
|
+
await listMRsNotInMilestone(options.milestone);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
program
|
|
228
|
+
.command('retarget')
|
|
229
|
+
.description('Retarget an MR to a different branch')
|
|
230
|
+
.requiredOption('-i, --id <id>', 'MR ID (e.g., 123)')
|
|
231
|
+
.requiredOption('-t, --target <branch>', 'Target branch (e.g., development)')
|
|
232
|
+
.action(async (options) => {
|
|
233
|
+
await retargetMR(parseInt(options.id), options.target);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
program
|
|
237
|
+
.command('close')
|
|
238
|
+
.description('Close an MR with a reason')
|
|
239
|
+
.requiredOption('-i, --id <id>', 'MR ID (e.g., 123)')
|
|
240
|
+
.requiredOption('-r, --reason <reason>', 'Reason for closing')
|
|
241
|
+
.action(async (options) => {
|
|
242
|
+
await closeMR(parseInt(options.id), options.reason);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
program
|
|
246
|
+
.command('rebase')
|
|
247
|
+
.description('Rebase an MR')
|
|
248
|
+
.requiredOption('-i, --id <id>', 'MR ID (e.g., 123)')
|
|
249
|
+
.action(async (options) => {
|
|
250
|
+
await rebaseMR(parseInt(options.id));
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
program
|
|
254
|
+
.command('assign')
|
|
255
|
+
.description('Assign an MR to a milestone')
|
|
256
|
+
.requiredOption('-i, --id <id>', 'MR ID (e.g., 123)')
|
|
257
|
+
.requiredOption('-m, --milestone <milestone>', 'Milestone name (e.g., v0.2.6)')
|
|
258
|
+
.action(async (options) => {
|
|
259
|
+
await assignMilestone(parseInt(options.id), options.milestone);
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
program
|
|
263
|
+
.command('bulk-retarget')
|
|
264
|
+
.description('Retarget all MRs in a milestone to a branch')
|
|
265
|
+
.requiredOption('-m, --milestone <milestone>', 'Milestone name (e.g., v0.2.6)')
|
|
266
|
+
.requiredOption('-t, --target <branch>', 'Target branch (e.g., development)')
|
|
267
|
+
.action(async (options) => {
|
|
268
|
+
await bulkRetarget(options.milestone, options.target);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
program
|
|
272
|
+
.command('bulk-rebase')
|
|
273
|
+
.description('Rebase all MRs with conflicts in a milestone')
|
|
274
|
+
.requiredOption('-m, --milestone <milestone>', 'Milestone name (e.g., v0.2.6)')
|
|
275
|
+
.action(async (options) => {
|
|
276
|
+
await bulkRebase(options.milestone);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
program.parse();
|