Reference
Release Notes
Release notes and upgrade guidance for the Rough Feature SDK.
The SDK is pre-1.0, so minor releases can contain breaking changes.
v0.9.3
This release improves the design of the Logs tab and adds support for the new Rough credit system.
There are no breaking changes; it is a safe upgrade from v0.9.x.
Added
- Rough now tracks how many credits each feature build uses. We have granted everyone a complimentary $10 in credits to test with.
- When your account runs low on credits, the Feature Builder will stop allowing users to start new builds but will continue to allow them to send chat messages and use the features they have already created.
- If your account runs out of credits completely, the Feature Builder will also stop allowing users to send messages.
- The Feature Builder sidebar now highlights features that are currently being built by displaying a spinner next to them.
Changed
- We have rebuilt the Logs tab in the Feature Builder. There is much less noise in the log, and it is now much easier to follow along with what the builder agent is thinking/doing.
- The agent is now responsible for installing the feature's dependencies, making it more resilient when iterating on complex features.
v0.9.2
We have removed the Rough logo from the bottom right of the screen. Now, when a build is in progress, a pill appears at the bottom center of the page, so that users can keep an eye on the build progress and get notified when the feature is ready to use.
There are no breaking changes to the public API; you can easily upgrade from any v0.9.x version.
Added
- When the user closes the Feature Builder while a build is in progress, a pill will appear at the bottom of the screen, one for each build in progress. This pill will notify the user when the build has completed and allows the user to quickly get back to the Feature Builder.
Changed
- The Rough logo is no longer displayed in the bottom right corner of the app. You will need to provide your users with a button that calls
openRoughBuilder()to launch the Feature Builder. - Long surface and feature names now wrap on two lines instead of getting truncated.
- The sidebar now adjusts its width to make better use of the available space in the Feature Builder.
Fixed
- The Edit Feature icon is now always displayed above Rough Features when using touch devices. This was previously not accessible. On desktop devices, it continues to be only shown on hover/focus.
- The loading spinners are now correctly centered -- previously they used to noticeably wobble!
v0.9.1
We have made significant improvements to the visual design of the Feature Builder, including a much better mobile experience.
There are no breaking changes to the public API, and you can upgrade from v0.9.0 without any code changes.
Changed
- On mobile devices, the Feature Builder now makes better use of the available space, stretching to fill up the entire screen. The sidebar now slides out on top for easier access, and the version selector appears as a pop-up drawer. The chat and preview screens are shown as separate panes, rather than cramming both onto the screen at the same time.
- Users may now unpublish features directly from the Feature Builder.
- We have added a toggle theme button to the bottom-left of the sidebar, allowing users to switch between the light/dark themes.
Fixed
- The chat will no longer start another build while there is already a build in progress for the same feature.
- When a user switches between different features, any unsent chat messages are now persisted, including pending file uploads. Previously, these unsent messages would have been lost.
v0.9.0
We have improved the Feature Builder UI! There is a new sidebar allowing users to see all their Features, understand what capabilities each Surface has, and a minimized launcher to easily jump back into the Feature Builder after waiting for a build to complete.
Breaking changes
- The
openRoughBuilder()function now returns aPromise<void>instead of aRoughBuilderHandle. This means you can no longer callbuilder.close()to close the Feature Builder modal; users decide when to close the modal - forcing a close would be confusing to users and may interrupt their work. TheRoughBuilderHandletype is no longer exported from the package. - The
themeoption has been removed fromopenRoughBuilder(); instead, pass it tostartRoughClient(). Useclient.setTheme()to follow your app’s theme. This ensures the correct theme is used, regardless of how the Feature Builder is opened.
// Before
const client = startRoughClient(clientOptions)
const builder = await openRoughBuilder({
client,
surface,
featureId,
theme: 'dark',
})
// Later:
builder.close()
// After
const client = startRoughClient({ ...clientOptions, theme: 'dark' })
await openRoughBuilder({ client, surface, featureId })
// When your app's theme changes:
client.setTheme('light')
// Users close the Builder from its UI.
Added
- We have added a sidebar to the Feature Builder. Your users can now create features directly from the Feature Builder, and switch between features quickly without having to close the modal.
- We have updated how capabilities are displayed, trying to make it easier for users to understand what functionality their features can utilize.
- When the Feature Builder is closed, we display the Rough logo in the bottom-right corner of the screen. It shows a spinner when builds are in progress.
Changed
- The build logs now automatically scroll to show the latest progress, while being smart enough to still allow users to scroll up to read previous logs.
- We have made it easier to switch between different versions of a feature and highlight which version is currently published and which is the latest version available.
Fixed
- When the chat agent starts a build, we ensure that the build card is already displayed. Previously, there was an issue with this card only appearing after closing and re-opening the Feature Builder.
- If a build fails, we ensure that any follow-up builds use the last successful build, rather than trying to build on top of the failed build.
See the v0.9.0 SDK reference for the complete API.
v0.8.0
This release makes some simplifications to the SDK and makes the exported types more consistent. You should also notice a significant performance improvement, as Rough Features now load much more quickly on the page.
Added
- We have improved the performance of how Rough Surfaces load. Previously, we would always require a round trip to the server before returning features. Now, if the user has already viewed the page at least once, we load features nearly instantly.
- New features may have an initial name by providing the
nameoption tocreateRoughFeature. By default, it will be an empty string, which will be automatically replaced with an AI-generated name once the user starts building a feature.
Breaking changes
- The
subscribeToRoughFeatures()function has changed a little.- Previously, it would return an object with a
readypromise and anunsubscribemethod. Now, it returns the unsubscribe function directly. - The
onChangecallback is now run immediately with the current list of features. This may be an empty array while Rough Features are loading. - The
onErrorcallback has been removed. Error handling should be done by providing anonErrorcallback tostartRoughClient - The returned features no longer have a .publishedFeatureBuildId
property. You should readpublishedFeatureBuildId` instead.
- Previously, it would return an object with a
// Before
const subscription = subscribeToRoughFeatures({
client,
surface,
onChange,
onError: (error) => console.error(error),
})
await subscription.ready
// During teardown:
await subscription.unsubscribe()
// After
const unsubscribe = subscribeToRoughFeatures({ client, surface, onChange })
// During teardown:
unsubscribe()
- The
openRoughBuilderfunction has changed:- It no longer returns an
EventTarget, so you cannot bind to events such asfeature:published. You can use thesubscribeToRoughFeaturesfunction to know when a feature has been published. - It still returns an object with a
closemethod. Previously, theclosemethod returned a promise. Now it no longer needs to be awaited.
- It no longer returns an
// before
const builder = await openRoughBuilder({ ... })
await builder.close()
// after
const builder = await openRoughBuilder({ ... })
builder.close()
- The
mountRoughFeaturehas changed:- This function no longer takes the
onfeaturepublishedcallback. If you need to detect when a feature has been published, use thesubscribeToRoughFeaturesfunction. - It still returns an object with
updateandunmountmethods. Previously, theunmountmethod returned a promise. Now it no longer needs to be awaited.
- This function no longer takes the
- The exported types
FeatureandRoughFeatureMetadatahave both been replaced with a new type:RoughFeature. - The exported type
RoughSurfaceDefinitionhas been renamed toRoughSurface. - The exported types
RoughCleanup,RoughFeatureSubscriptionandFeaturePublishedDetailhave all been removed.
v0.7.2
We have a small release today, with no changes to the public API.
Added
- Features can now be unpublished from the management console! Unpublished features will be excluded from
subscribeToRoughFeatures. You can still explicitly display a Rough Feature usingmountRoughFeature, and its specificbuildId.
Fixed
- We have fixed an annoying bug where the Feature Builder preview unexpectedly reloads and flashes while idle.
Changed
- Rough now records which version of the SDK is being used on which projects. We need this so we can see which versions of the SDK are currently being used in production, helping us make decisions around how long we need to support past versions of the SDK.
v0.7.1
This is a patch release that fixes our TypeScript type definitions.
We have also hidden internal properties from the RoughClient type, so that we
can change these in future versions without having to support backwards
compatibility.
Breaking type change
- The
RoughClienttype has now had most of its internal properties hidden away. The only public property it has now is a singledestroy()method.
You should never need to access the internal properties of theRoughClient, instead use our public SDK functions (see the SDK Reference for details). By hiding them, we can also simplify the package type definitions.
Fixed
- As part of the simplification of our type definitions, we have also fixed
some errors with how the
index.d.tsfile was being created.
This update fixes TypeScript errors caused by the published declarations in v0.7.0.
v0.7.0
This is a big one! We have made some great quality-of-life improvements to our SDK. It is simpler to work with and more reliable. However, that also comes with a large number of breaking changes.
Breaking changes
- The stylesheet has been removed. You should no longer import
@roughapp/feature/style.css. We now automatically handle loading the stylesheet for you. - The
getRoughFeaturesfunction has been renamed tosubscribeToRoughFeatures,a more accurate description of what it does. The callback method has also been renamed fromonFeaturestoonChange.
// before
getRoughFeatures({ client, surface, onFeatures })
// after
subscribeToRoughFeatures({ client, surface, onChange })
- The way to create a new feature with the Feature Builder has also changed. The function
openRoughCreatehas been replaced with two separate function calls:createRoughFeature: create a new Rough FeatureopenRoughBuilder: open the Feature Builder for a specific feature
- This is more modular, meaning you can use the same
openRoughBuilderfunction to edit existing features or newly created ones.
// before
openRoughCreate({ client, surface })
// after
const feature = await createRoughFeature({ client, surface })
openRoughBuilder({ client, surface, featureId: feature.id })
- The function
createRoughClienthas been renamed tostartRoughClient. We changed it tostartto minimise confusion with the verbcreatealso being used withcreateRoughFeature. - Starting a new Rough Client now requires two new properties:
externalUserId: the ID of the currently logged-in user. Must match the JWTsubfield.externalAccountId: the ID of the account that the user is logged into. Must match the JWTrough.account.idfield.
- Note: both of these are your app's identifiers, and must match the values you specify in the JWT returned by
fetchUserToken. - There is also a new
onErrorcallback you can subscribe to be notified of any authentication errors.
// before
const client = createRoughClient({
projectId: 'my-rough-project-123',
fetchUserToken: () => { ... }
})
// after
const client = startRoughClient({
projectId: 'my-rough-project-123',
externalUserId: localSession.userId,
externalAccountId: localSession.accountId,
fetchUserToken: () => { ... },
onError: (error) => {
console.error(error)
}
})
- The
whenRoughClientReadyfunction has been removed. This is no longer necessary, as the Rough Client is now synchronous and can be used immediately. - We have removed the
<rough-feature>Web Component and<RoughFeature>Svelte components from the SDK. These were difficult to work with (especially if you are not using Svelte as your framework) and have been replaced with a vanilla JS function,mountRoughFeature. ThebuildIdproperty is now optional if you want to display the currently published version of the feature.
// before
const element = document.createElement('rough-feature')
element.client = client
element.surface = surface
element.featureId = feature.id
element.buildId = feature.publishedSpriteBuildId
container.append(element)
// after
const element = mountRoughFeature(container, {
client,
surface,
featureId: feature.id,
})
- We have also removed all other Web Components that were previously being registered:
<rough-create-modal>: callcreateRoughFeatureandopenRoughBuilderinstead<rough-edit-modal>: callopenRoughBuilderinstead<rough-edit-button>: callopenRoughBuilderinstead
- We have also removed all other Svelte components, including:
<RoughCreateModal>: callcreateRoughFeatureandopenRoughBuilderinstead<RoughEditButton>: callopenRoughBuilderinstead
- When calling
defineRoughSurface, the deprecatedtoolsproperty has been removed. You must usetoolList(see the v0.6.0 release notes for more details).
Added
- The Feature Builder now lets you choose whether to use a dark or light theme! When calling
openRoughBuilder,you can now passtheme: "dark"to use the dark theme (it defaults to the light theme). - We have finally got a good way to display Rough Features on your app:
mountRoughFeature. This is a vanilla JS function that is very easy to work with. Just pass it aclient,surface,afeatureId,and an HTML Element to mount it inside of. It has anupdatemethod allowing you to update the props and anunmountmethod to remove it from the page. You no longer need to pass abuildId- the currently published version will be displayed by default - but if you do want to display a particular version, you can specify thebuildId.
Changed
- Now that
startRoughClienthas access to theexternalUserIdandexternalAccountId, it can immediately load previously cached data, substantially reducing startup times. - We have fixed an issue with the Feature Builder UI being affected by global CSS rules. We now mount the Feature Builder inside a Shadow Root, so that we can guarantee it looks good on any website. We also now bundle a webfont, so it looks good on any computer.
- The
subscribeToRoughFeaturesfunction will only callonChangewhen the list of features actually changes. Previously, we were seeing issues with this callback happening more frequently than necessary, sometimes causing re-rendering issues.
v0.6.0
We have been tidying up our codebase this week and renaming some internal
components to be more consistent. We have tried to minimise the number of
breaking changes, but there are a few minor adjustments you will need to make
in your apps. Surfaces now use toolList (previously tools) and we have
removed the custom error classes to keep things simple. On the new features
side, you can now specify a custom prompt for your Rough Project, which can
guide how Rough builds Features, helping them feel even more at home in your
product!
Breaking changes
- The Surface
toolsproperty has been renamed totoolList. New code should passtoolListtodefineRoughSurface(), and readsurface.toolListinstead. To make this transition easier, thedefineRoughSurface()function will continue to accepttools, but we highly recommend that you refactor your code to usetoolList, as we will be removing this option in a future version.Migration steps…
- Replace the
toolsoption in each call todefineRoughSurface()withtoolList. - Replace any reads of
surface.toolswithsurface.toolList. - Run your type checks and tests to catch Surface definitions or helpers that still use the old property.
Scroll to see more →// Before const surface = defineRoughSurface({ key: 'dashboard', name: 'Dashboard', description: 'The main dashboard view', tools: [getCurrentUser], }) console.log(surface.tools) // After const surface = defineRoughSurface({ key: 'dashboard', name: 'Dashboard', description: 'The main dashboard view', toolList: [getCurrentUser], }) console.log(surface.toolList) - Replace the
- Our custom error classes have been removed. The SDK now throws plain old
Errorvalues. This keeps error handling simpler, but if you were importing one of our customRough*Errorclasses, you will need to change your code.Migration steps…
- Remove imports of
RoughClientDestroyError,RoughClientDestroyedError,RoughInvalidClientError,RoughReplicacheIdentityConflictError, andRoughSurfaceContractConflictError. - Replace
instanceof Rough*Errorbranches with your app's normal error reporting or recovery flow. - Stop reading the removed
errors,replicacheName, andsurfaceKeyfields. Display the regular error message where useful, but do not depend on matching its text for application logic.
Scroll to see more →// Before import { RoughClientDestroyedError, RoughSurfaceContractConflictError, } from '@roughapp/feature' try { await openRoughCreate({ client, surface }) } catch (error) { if (error instanceof RoughClientDestroyedError) { // ... } } // After try { await openRoughCreate({ client, surface }) } catch (error) { const message = error instanceof Error ? error.message : String(error) reportError(message) } - Remove imports of
Added
- Rough Projects can now have custom prompts! Rough admins can specify a custom system prompt for their Rough Features. This lets you guide how the Features should fit into your product by specifying conventions or particular styles for generated Rough Features.
v0.5.0
Users can now upload images to Feature Builder chats, and when embedding a
Rough Feature, you can now hide Rough's editing controls. This release also
removes the <rough-surface> component and cleans up the styling of the
<rough-feature> frame.
Breaking changes
<rough-surface>has been removed. Instead of using Rough to render a list of surfaces, we encourage you to control how features are rendered. You can use thegetRoughFeatures()function to access the feature list, and then render each using<rough-feature>. This gives you full control over how and where features are rendered for a Surface.Migration Guide…
Scroll to see more →// Before: <rough-surface> rendered every published feature const surfaceElement = document.createElement('rough-surface') surfaceElement.client = client surfaceElement.surface = surface slot.append(surfaceElement) // After: subscribe and render each feature in host-owned layout const subscription = getRoughFeatures({ client, surface, onFeatures: (features) => { slot.replaceChildren( ...features.flatMap((feature) => { if (!feature.publishedSpriteBuildId) return [] const featureElement = document.createElement('rough-feature') featureElement.client = client featureElement.surface = surface featureElement.featureId = feature.id featureElement.buildId = feature.publishedSpriteBuildId return [featureElement] }), ) }, }) // When this part of the UI unmounts await subscription.unsubscribe()<rough-feature>no longer has visible border styles. This makes it easier to integrate Rough Features into your app aesthetically, allowing you to control how the feature frame looks.
Added
- Users can upload images. Each message can now have up to three GIF, JPEG, PNG, or WebP images attached. These images can be used to influence the feature design or even be integrated and displayed in the feature directly.
- The new
isEditableprop hides the Rough Edit button. WhenisEditableis set tofalse, users will no longer see the Rough Icon button and will not be able to customise that feature.
v0.4.2
We have made the Feature Builder a little better at helping users when a build goes wrong. The chat assistant can now read build logs, and we have improved how quickly build and publish updates reach your app.
Added
- The chat assistant can now look at the logs for a specific build. When a user asks a follow-up question, it can use the build steps, errors and agent output to understand what happened.
Changed
- When a feature is published from the management app, or a build makes progress in the background, connected SDK clients now receive the update over the project WebSocket. Previously, these updates had to wait for the next poll.
- We have reduced fallback polling from every five seconds to once per minute, cutting down on background requests while the WebSocket is connected.
Fixed
- The Build Logs panel now keeps showing the latest build in the conversation, even if the user previews an earlier successful build. Previously, switching the preview would also replace the logs, making it harder to follow what was happening.
v0.4.1
We have expanded the README with more guidance on setup, security, managing clients, theming and the API. We have also added the release notes that were missing from v0.4.0. This is a documentation-only release, with no runtime, type or API changes.
v0.4.0
You can now chat with the Feature Builder! Rough can ask questions about what you want to build, look at the tools available on the Surface, and start a build once it has enough information.
The recommended client and Surface APIs have not changed, so you do not need
to change your integration. If you use the exported SpriteBuild type
directly, there is a type change to account for below.
Added
- Each feature now has its own chat conversation, which is saved so users can pick up where they left off when they reopen the Feature Builder. Users can send follow-up messages to work out the details before starting another build.
- The assistant's messages now support Markdown, including headings, lists, links, tables, blockquotes and code blocks.
- Users can now stop a build! Pending and in-progress builds have a Stop button. Canceled builds stay in the conversation and build log, along with how long they ran before stopping.
Changed
- Build and publish updates now reach your app over an authenticated WebSocket when available, rather than waiting for the next five-second poll. The SDK still falls back to polling if needed.
- Opening the Feature Builder and closing it without sending a message no longer leaves an empty feature behind. We now wait until the user sends their first message before creating the feature.
Breaking type change
- If you use the incidental
SpriteBuildexport directly, you will need to handle the newCANCELEDstatus. Build records also have a newcancelRequestedAt: number | nullfield. Update any exhaustive status switches and test fixtures to account for these changes.
v0.3.0
You can now show features from multiple Rough Projects in the same app! We have replaced global initialization with a separate client for each project, so you can control when each client starts and stops.
This comes with some breaking API changes. There is a migration example below to help you update your integration.
Breaking changes
- The SDK's stateful functions and components now need a client. Pass
clientandsurfacetogetRoughFeatures(),openRoughCreate(),<rough-surface>,<rough-feature>,<rough-edit-button>and the modal elements. - Cleanup methods now return promises and are safe to call more than once.
Use
awaitwithclient.destroy(),subscription.unsubscribe()andmodal.close()if you need to wait for cleanup to finish. - Share one client for each signed-in person and project. Creating a second
client with the same
baseUrl,projectIdand person will throw an error. You can still run clients for different projects or different people at the same time. - You no longer need a mounted Rough component to call
openRoughCreate(). Just pass it a client and Surface.
Added
- The new
createRoughClient({ projectId, baseUrl?, fetchUserToken })function creates and starts a client for one project. Keep it for as long as your app needs that project, then callawait client.destroy()when you are done. - You can use
whenRoughClientReady({ client })to wait for the client to start, or catch any errors during startup. openRoughCreate()now accepts atargetelement. This lets you put the create modal inside the element where you have set up your Rough theme, rather than attaching it todocument.body, which is still the default.
Removed
- We have removed
initRough(). UsecreateRoughClient()instead; there is no longer a default or global client. defineSurface()has been renamed todefineRoughSurface(). You will also need to renametoolListtotoolsin your Surface definitions.- We have removed
registerSurfaceEntry. You no longer need to register a Surface before using it.
Migration
// Before
initRough({ projectId, fetchUserToken })
const surface = defineSurface({ key, name, description, toolList })
const unsubscribe = getRoughFeatures(surface, onFeatures)
openRoughCreate(surface, { projectId })
// After
const client = createRoughClient({ projectId, fetchUserToken })
const surface = defineRoughSurface({ key, name, description, tools })
const subscription = getRoughFeatures({ client, surface, onFeatures })
const modal = await openRoughCreate({ client, surface })
await modal.close()
await subscription.unsubscribe()
await client.destroy()
v0.2.1
We now include this changelog in the npm package, so you can find release notes and upgrade guidance alongside the installed SDK. There are no runtime, type or API changes.
v0.2.0
Rough Features now stay up to date automatically! This release moves the SDK to our supported synchronization service, so your app can receive feature and build updates without having to request a refresh.
If you are still on v0.1.0, please upgrade as soon as you can. The service endpoints it uses have been retired, so it can no longer list, create, build or publish features.
You do not need to change your configuration. initRough still takes
projectId, fetchUserToken and an optional baseUrl, and no exports have
been added or removed. There are, however, some changes to the exported data
types, component props and theme variables to account for below.
Breaking changes
SpriteandSpriteBuildnow store the IDs of related records, rather than including the records themselves.Scroll to see more →// 0.1.0 type Sprite = { id: string name: string ownedByPersonId: string publishedSpriteBuild: SpriteBuild | null // full nested record } type SpriteBuild = { createdByPerson: { id: string; name: string } // ... } // 0.2.0 type Sprite = { id: SpriteId name: string ownedByPersonId: PersonId publishedSpriteBuildId: SpriteBuildId | null // ID only } type SpriteBuild = { createdByPersonId: PersonId // ... }If you read
sprite.publishedSpriteBuild.artifactUrl,.statusor.promptfrom agetRoughFeaturesresult, you will need to update that code.SpriteBuildalso no longer includes the build author's display name; there is no replacement for that name in the public API.- IDs now use branded string types.
SpriteId,SpriteBuildId,SurfaceIdandPersonIdare nowstring & { __brand: … }rather than plain strings. This affectsRoughFeature'sfeatureIdandbuildId,RoughCreateModal's andSpriteBuildMenu'ssurfaceId,SpriteFrame'sspriteBuildId, andregisterSurfaceEntry'ssurfaceId.You can still read these IDs as strings, but TypeScript will no longer accept a plain string from your database or a URL parameter where a branded ID is expected. We do not export the brand types directly; you can get them through the exported types instead:
Scroll to see more →type SpriteId = Sprite['id'] type SpriteBuildId = NonNullable<Sprite['publishedSpriteBuildId']> type SurfaceId = RoughCreateModalElement['surfaceId']If you pass IDs straight from
getRoughFeaturesinto a component, you do not need to add any casts. - We have expanded the stylesheet's design tokens. If you customise Rough
using CSS custom properties, replace these eight removed variables with
their closest equivalents:
Removed in 0.2.0 Closest 0.2.0 token --rough-text--rough-foreground--rough-text-secondary--rough-muted-foreground--rough-surface--rough-card--rough-surface-border--rough-border--rough-background-muted--rough-muted--rough-danger--rough-destructive--rough-shadow--rough-shadow-xs,-md,-lg--rough-accent-secondaryNo equivalent; --rough-brandis the saturated brand colourThere is also a change to
--rough-accent: it now controls a subtle hover background, rather than the primary action colour. If you used it to give buttons your brand colour, move that colour to--rough-primaryinstead.--rough-backgroundand--rough-borderkeep their names but have new values. We have also added variables for radius and success states.
Changed
- The SDK now keeps feature data up to date while it is mounted, polling every five seconds instead of making one-off requests. If you monitor network traffic or use request allowlists, you may need to account for this.
getRoughFeaturesis now a live subscription. Previously, its callback ran once, then only ran again when something calledtriggerRefresh. It now runs whenever a relevant change syncs in, so features published in another tab or by another user can appear without your app requesting a refresh.- Continuous sync has increased the size of the JavaScript bundle.
index.jshas grown from 105 kB to 320 kB raw (27 kB to 77 kB gzipped). The expanded theme tokens also increase the stylesheet from 324 B to 5.2 kB.
Removed
- We have removed
onpublishfromRoughCreateModal,RoughEditButtonandRoughEditModal. Publish updates now arrive through thegetRoughFeaturescallback, so move any publish handling there instead. The old prop was optional, so you may not get a compile-time error to remind you to change it. - We have also removed
triggerRefreshfrom theSurfaceEntrypassed toregisterSurfaceEntry. With automatic updates, there is no longer anything to refresh manually. Remove it from the object you pass in, or TypeScript will reject it as an excess property.
Added
- Users can now switch between light and dark mode in the Feature Builder.
The stylesheet includes a
.rough-darkclass with dark values for every theme token. - The build log now shows token usage and estimated cost for each agent step. Costs below one dollar are shown in cents.
v0.1.0
Our first public release of the Rough Feature SDK! You can embed Rough in your app and let users create, build and publish their own features without leaving your product.
This version is no longer supported. The service endpoints it uses have been retired, so please use a current release for your integration.
Added
- The npm package includes compiled ESM, TypeScript declarations, Web Components and a separate stylesheet, ready to use with a modern bundler.
- You can set up project and user authentication with
initRough(). Pass your project details, afetchUserTokencallback from your app, and an optional API base URL. - Use
defineSurface()to describe where features can appear and whichQuery,MutationandSubscriptiontools they can call. - You can display published features with
RoughSurfaceor<rough-surface>, and usegetRoughFeatures()to get the published feature list for a Surface. - Call
openRoughCreate()to open the Feature Builder, where users can create, build and publish features directly inside your app.