{"kind":"AgentDefinition","metadata":{"namespace":"community","name":"pcf-manifest-schema","version":"0.1.0"},"spec":{"agents_md":"---\ndescription: 'Complete manifest schema reference for PCF components with all available XML elements'\napplyTo: '**/*.xml'\n---\n\n# Manifest Schema Reference\n\nThe manifest file (`ControlManifest.Input.xml`) is a metadata document that defines your code component. This reference lists all available manifest elements and their purposes.\n\n## Root Element\n\n### manifest\n\nThe root element that contains the entire component definition.\n\n## Core Elements\n\n### code\n\nRefers to the resource file that implements the component logic.\n\n**Attributes:**\n- `path`: Path to the TypeScript/JavaScript implementation file\n- `order`: Loading order (typically \"1\")\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n### control\n\nDefines the component itself, including namespace, version, and display information.\n\n**Key Attributes:**\n- `namespace`: Namespace for the component\n- `constructor`: Constructor name\n- `version`: Semantic version (e.g., \"1.0.0\")\n- `display-name-key`: Resource key for display name\n- `description-key`: Resource key for description\n- `control-type`: Type of control (\"standard\" or \"virtual\")\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n## Property Elements\n\n### property\n\nDefines an input or output property for the component.\n\n**Key Attributes:**\n- `name`: Property name\n- `display-name-key`: Resource key for display name\n- `description-key`: Resource key for description\n- `of-type`: Data type (e.g., \"SingleLine.Text\", \"Whole.None\", \"TwoOptions\", \"DateAndTime.DateOnly\")\n- `usage`: Property usage (\"bound\" or \"input\")\n- `required`: Whether property is required (true/false)\n- `of-type-group`: Reference to a type-group\n- `default-value`: Default value for the property\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n### type-group\n\nDefines a group of types that a property can accept.\n\n**Usage:** Allows a property to accept multiple data types\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n## Data Set Elements\n\n### data-set\n\nDefines a dataset property for working with tabular data.\n\n**Key Attributes:**\n- `name`: Dataset name\n- `display-name-key`: Resource key for display name\n- `description-key`: Resource key for description\n\n**Availability:** Model-driven apps (canvas apps with limitations)\n\n## Resource Elements\n\n### resources\n\nContainer for all resource definitions (code, CSS, images, localization).\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n### css\n\nReferences a CSS stylesheet file.\n\n**Attributes:**\n- `path`: Path to CSS file\n- `order`: Loading order\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n### img\n\nReferences an image resource.\n\n**Attributes:**\n- `path`: Path to image file\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n### resx\n\nReferences a resource file for localization.\n\n**Attributes:**\n- `path`: Path to .resx file\n- `version`: Version number\n\n**Availability:** Model-driven apps, canvas apps, portals\n\n## Feature Usage Elements\n\n### uses-feature\n\nDeclares that the component uses a specific platform feature.\n\n**Key Attributes:**\n- `name`: Feature name (e.g., \"Device.captureImage\", \"Device.getCurrentPosition\", \"Utility.lookupObjects\", \"WebAPI\")\n- `required`: Whether feature is required (true/false)\n\n**Common Features:**\n- Device.captureAudio\n- Device.captureImage\n- Device.captureVideo\n- Device.getBarcodeValue\n- Device.getCurrentPosition\n- Device.pickFile\n- Utility.lookupObjects\n- WebAPI\n\n**Availability:** Varies by feature and platform\n\n### feature-usage\n\nContainer for feature declarations.\n\n**Availability:** Model-driven apps, canvas apps\n\n## Dependency Elements\n\n### dependency\n\nDeclares external dependencies required by the component.\n\n**Availability:** Model-driven apps, canvas apps\n\n### external-service-usage\n\nDeclares external services that the component uses.\n\n**Key Attributes:**\n- `enabled`: Whether external service usage is enabled (true/false)\n\n**Availability:** Model-driven apps, canvas apps\n\n## Library Elements\n\n### platform-library\n\nReferences a platform-provided library (e.g., React, Fluent UI).\n\n**Key Attributes:**\n- `name`: Library name (e.g., \"React\", \"Fluent\")\n- `version`: Library version\n\n**Availability:** Model-driven apps, canvas apps\n\n## Event Elements\n\n### event\n\nDefines custom events that the component can raise.\n\n**Key Attributes:**\n- `name`: Event name\n- `display-name-key`: Resource key for display name\n- `description-key`: Resource key for description\n\n**Availability:** Model-driven apps, canvas apps\n\n## Action Elements\n\n### platform-action\n\nDefines platform actions that the component can invoke.\n\n**Availability:** Model-driven apps\n\n## Example Manifest Structure\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cmanifest\u003e\n  \u003ccontrol namespace=\"SampleNamespace\" \n           constructor=\"SampleControl\" \n           version=\"1.0.0\" \n           display-name-key=\"Sample_Display_Key\" \n           description-key=\"Sample_Desc_Key\" \n           control-type=\"standard\"\u003e\n    \n    \u003c!-- Properties --\u003e\n    \u003cproperty name=\"sampleProperty\" \n              display-name-key=\"Property_Display_Key\" \n              description-key=\"Property_Desc_Key\" \n              of-type=\"SingleLine.Text\" \n              usage=\"bound\" \n              required=\"true\" /\u003e\n    \n    \u003c!-- Type Group Example --\u003e\n    \u003ctype-group name=\"numbers\"\u003e\n      \u003ctype\u003eWhole.None\u003c/type\u003e\n      \u003ctype\u003eCurrency\u003c/type\u003e\n      \u003ctype\u003eFP\u003c/type\u003e\n      \u003ctype\u003eDecimal\u003c/type\u003e\n    \u003c/type-group\u003e\n    \n    \u003cproperty name=\"numericProperty\"\n              display-name-key=\"Numeric_Display_Key\"\n              of-type-group=\"numbers\"\n              usage=\"bound\" /\u003e\n    \n    \u003c!-- Data Set Example --\u003e\n    \u003cdata-set name=\"dataSetProperty\" \n              display-name-key=\"Dataset_Display_Key\"\u003e\n    \u003c/data-set\u003e\n    \n    \u003c!-- Events --\u003e\n    \u003cevent name=\"onCustomEvent\"\n           display-name-key=\"Event_Display_Key\"\n           description-key=\"Event_Desc_Key\" /\u003e\n    \n    \u003c!-- Resources --\u003e\n    \u003cresources\u003e\n      \u003ccode path=\"index.ts\" order=\"1\" /\u003e\n      \u003ccss path=\"css/SampleControl.css\" order=\"1\" /\u003e\n      \u003cimg path=\"img/icon.png\" /\u003e\n      \u003cresx path=\"strings/SampleControl.1033.resx\" version=\"1.0.0\" /\u003e\n    \u003c/resources\u003e\n    \n    \u003c!-- Feature Usage --\u003e\n    \u003cfeature-usage\u003e\n      \u003cuses-feature name=\"WebAPI\" required=\"true\" /\u003e\n      \u003cuses-feature name=\"Device.captureImage\" required=\"false\" /\u003e\n    \u003c/feature-usage\u003e\n    \n    \u003c!-- Platform Library --\u003e\n    \u003cplatform-library name=\"React\" version=\"16.8.6\" /\u003e\n    \u003cplatform-library name=\"Fluent\" version=\"8.29.0\" /\u003e\n    \n  \u003c/control\u003e\n\u003c/manifest\u003e\n```\n\n## Manifest Validation\n\nThe manifest schema is validated during the build process:\n- Missing required elements will cause build errors\n- Invalid attribute values will be flagged\n- Use `pac pcf` commands to validate manifest structure\n\n## Best Practices\n\n1. **Semantic Versioning**: Use semantic versioning (major.minor.patch) for component versions\n2. **Localization Keys**: Always use resource keys instead of hardcoded strings\n3. **Feature Declaration**: Declare all features your component uses\n4. **Required vs Optional**: Mark properties and features as required only when truly necessary\n5. **Type Groups**: Use type-groups for properties that accept multiple numeric types\n6. **Data Types**: Choose the most specific data type that matches your requirements\n7. **CSS Scoping**: Scope CSS to avoid conflicts with host applications\n8. **Resource Organization**: Keep resources organized in separate folders (css/, img/, strings/)\n\n## Data Type Reference\n\nCommon `of-type` values for properties:\n\n- **Text**: SingleLine.Text, Multiple, SingleLine.TextArea, SingleLine.Email, SingleLine.Phone, SingleLine.Url, SingleLine.Ticker\n- **Numbers**: Whole.None, Currency, FP, Decimal\n- **Date/Time**: DateAndTime.DateAndTime, DateAndTime.DateOnly\n- **Boolean**: TwoOptions\n- **Lookup**: Lookup.Simple\n- **OptionSet**: OptionSet, MultiSelectOptionSet\n- **Other**: Enum\n\n## Platform Availability Legend\n\n- ✅ **Model-driven apps**: Fully supported\n- ✅ **Canvas apps**: Supported (may have limitations)\n- ✅ **Portals**: Supported in Power Pages\n\nMost manifest elements are available across all platforms, but some features (like certain Device APIs or platform actions) may be platform-specific. Always test in your target environment.\n","description":"Complete manifest schema reference for PCF components with all available XML elements","import":{"commit_sha":"541b7819d8c3545c6df122491af4fa1eae415779","imported_at":"2026-05-18T20:05:35Z","license_text":"MIT License\n\nCopyright GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","owner":"github","repo":"github/awesome-copilot","source_url":"https://github.com/github/awesome-copilot/blob/541b7819d8c3545c6df122491af4fa1eae415779/instructions/pcf-manifest-schema.instructions.md"},"manifest":{}},"content_hash":[245,212,73,129,93,88,68,98,1,2,240,53,159,220,235,177,181,206,254,35,10,180,108,93,144,103,83,234,234,90,83,14],"trust_level":"unsigned","yanked":false}
