stillmade-sdk 0.1.16 → 0.1.17

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.
@@ -147,6 +147,6 @@ async function serveHost(res,path){
147
147
  policies||=JSON.parse(await readFile(join(HOST_FILES,'policies.json'),'utf8'));
148
148
  Object.assign(headers,{'Content-Security-Policy':policies.blockUiSandbox,'X-Frame-Options':'SAMEORIGIN','Permissions-Policy':'camera=(), microphone=(), geolocation=()'});
149
149
  }
150
- if(name==='index.html')Object.assign(headers,{'Content-Security-Policy':policies?.devHost||"default-src 'self'; img-src 'self' data: blob:; media-src 'self' blob: data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; connect-src 'self'; frame-src 'self'; object-src 'none'; base-uri 'none'"});
150
+ if(name==='index.html')Object.assign(headers,{'Content-Security-Policy':policies?.devHost||"default-src 'self'; img-src 'self' data: blob:; media-src 'self' blob: data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; connect-src 'self' data: blob:; worker-src 'self' blob:; frame-src 'self' blob:; object-src 'none'; base-uri 'none'"});
151
151
  return end(res,200,typeOf(name),bytes,headers);
152
152
  }
@@ -38,9 +38,9 @@ const definitions=[
38
38
  ['editor-transform','Timeline → Editor proposal','Propose changes to clips, then apply them through Editor undo.',quieterClips],
39
39
  ['captions','Text → Caption proposal','Add timed captions through the shared timeline contract.',captionFromText],
40
40
  ['stateful','Stateful Block','Keep an independent counter for each placement in a project.',numberedTakes],
41
- ['screen-recording','Screen recorder','Record an explicitly chosen screen in the desktop app.',screenRecorder],
42
- ['camera-recording','Camera recorder','Capture camera footage with desktop permission.',cameraRecorder],
43
- ['microphone-recording','Microphone recorder','Record audio with desktop permission.',microphoneRecorder],
41
+ ['screen-recording','Screen recorder','Record a screen or window you choose, in your browser or the desktop app.',screenRecorder],
42
+ ['camera-recording','Camera recorder','Record your camera, in your browser or the desktop app.',cameraRecorder],
43
+ ['microphone-recording','Microphone recorder','Record your microphone, in your browser or the desktop app.',microphoneRecorder],
44
44
  ];
45
45
  export const BLOCK_STARTERS=Object.freeze(definitions.map(([id,name,description,source])=>({id,name,description,runtime:source.manifest.runtime})));
46
46
  export function newBlockFromStarter(starter,id){
@@ -3,6 +3,7 @@
3
3
  // immutable, so the plain wording for first-party Blocks lives here, by Block id.
4
4
  // A Block whose own description is already plain needs no entry.
5
5
  export const PLAIN_BLOCK_DESCRIPTIONS=Object.freeze({
6
+ 'stillmade.screen-recorder':'Record your screen or a window, keep it on your device, cut out the parts you do not want, and pass it on.',
6
7
  'sm.script':'Write and edit a script with AI. Set a length, add notes, and go back to earlier versions.',
7
8
  'sm.shot-plan':'Turn a script into a list of timed shots, then edit what each shot shows and how long it lasts.',
8
9
  'sm.blueprint':'Plan your video’s scenes, characters and look in one place, and lock the parts you want to keep.',
@@ -6,9 +6,9 @@ function recorder(kind,name){
6
6
  const mediaType=kind==='microphone'?'audio':'video';
7
7
  const media=mediaType==='audio'?sampleAudio:sampleVideo;
8
8
  return {
9
- manifest:{schemaVersion:1,sdkVersion:'0.1.0',id:`example.${kind}-recorder`,version:'1.0.0',name,description:`Record ${kind==='screen'?'a screen or window you choose':kind==='camera'?'your camera':'your microphone'} in StillMade desktop and pass the saved media to your workflow.`,kind:'task',runtime:'javascript',license:'MIT',provenance:EXAMPLE_PROVENANCE,platforms:{phone:{supported:false,reason:'Recording requires the StillMade desktop app.'},browser:{supported:false,reason:'Recording requires the StillMade desktop app.'},desktop:{supported:true}},inputs:{media:{type:mediaType,primary:true}},outputs:{media:{type:mediaType,primary:true}},permissions:{project:[],desktop:[`${kind}.capture`]},ui:[]},
9
+ manifest:{schemaVersion:1,sdkVersion:'0.1.0',id:`example.${kind}-recorder`,version:'1.0.0',name,description:`Record ${kind==='screen'?'a screen or window you choose':kind==='camera'?'your camera':'your microphone'} in StillMade or the StillMade desktop app and pass the saved media to your workflow.`,kind:'task',runtime:'javascript',license:'MIT',provenance:EXAMPLE_PROVENANCE,platforms:{phone:{supported:false,reason:'Recording needs a desktop browser or the StillMade desktop app.'},browser:{supported:true},desktop:{supported:true}},inputs:{media:{type:mediaType,primary:true}},outputs:{media:{type:mediaType,primary:true}},permissions:{project:[],desktop:[`${kind}.capture`]},ui:[]},
10
10
  code:'return {media: input.media};',
11
- view:{html:`<section><h2>${name}</h2><p>Record in the desktop app. You choose when recording starts and stops.</p><div><button id="start" type="button">Start recording</button><button id="stop" type="button" disabled>Stop and use recording</button><button id="cancel" type="button" disabled>Cancel</button></div><p id="status" role="status">Ready to record. Device access requires your permission.</p></section>`,css:'section { padding: 1.5rem; } h2 { font-style: italic; font-weight: 400; } div { display: flex; flex-wrap: wrap; gap: .6rem; } button { border: 1px solid var(--border-tok); border-radius: 999px; padding: .7rem 1rem; background: var(--bg-elev-1); color: var(--fg); } button:disabled { opacity: .5; } p { color: var(--fg-muted); }',javascript:`
11
+ view:{html:`<section><h2>${name}</h2><p>Record here in your browser or in the desktop app. You choose when recording starts and stops.</p><div><button id="start" type="button">Start recording</button><button id="stop" type="button" disabled>Stop and use recording</button><button id="cancel" type="button" disabled>Cancel</button></div><p id="status" role="status">Ready to record. Device access requires your permission.</p></section>`,css:'section { padding: 1.5rem; } h2 { font-style: italic; font-weight: 400; } div { display: flex; flex-wrap: wrap; gap: .6rem; } button { border: 1px solid var(--border-tok); border-radius: 999px; padding: .7rem 1rem; background: var(--bg-elev-1); color: var(--fg); } button:disabled { opacity: .5; } p { color: var(--fg-muted); }',javascript:`
12
12
  const start=document.getElementById('start');
13
13
  const stop=document.getElementById('stop');
14
14
  const cancel=document.getElementById('cancel');
@@ -185,6 +185,7 @@ export const FIRST_PARTY_SDK_IDENTITIES=Object.freeze(new Set([
185
185
  "stillmade.release-visuals@1.0.0",
186
186
  "stillmade.release-visuals@1.0.1",
187
187
  "stillmade.release-visuals@1.0.2",
188
+ "stillmade.screen-recorder@1.0.0",
188
189
  "stillmade.short-form-finish@1.0.0",
189
190
  "stillmade.short-form-finish@1.0.1",
190
191
  "stillmade.short-form-finish@1.0.2",
@@ -2,6 +2,7 @@ import shortFormFinishV100 from '../../blocks/short-form-finish/versions/1.0.0/p
2
2
  import shortFormFinishV101 from '../../blocks/short-form-finish/versions/1.0.1/package.js';
3
3
  import shortFormFinishV102 from '../../blocks/short-form-finish/versions/1.0.2/package.js';
4
4
  import shortFormFinish from '../../blocks/short-form-finish/package.js';
5
+ import screenRecorder from '../../blocks/screen-recorder/package.js';
5
6
  import occasionStoryV100 from '../../blocks/occasion-story/versions/1.0.0/package.js';
6
7
  import releaseVisualsV100 from '../../blocks/release-visuals/versions/1.0.0/package.js';
7
8
  import occasionStoryV101 from '../../blocks/occasion-story/versions/1.0.1/package.js';
@@ -189,5 +190,5 @@ import pickPhotos from '../../blocks/native/sm.pick-photos/versions/1.0.0/packag
189
190
  // Exact, independently executable first-party releases. Host workspaces do not
190
191
  // belong here. Changing implementation requires a new immutable version.
191
192
  const freeze=value=>{if(value&&typeof value==='object'&&!Object.isFrozen(value)){Object.values(value).forEach(freeze);Object.freeze(value);}return value;};
192
- export const FIRST_PARTY_SDK_PACKAGES = Object.freeze([freeze(productAdVariants),freeze(pickPhotos),freeze(photoNotes),freeze(youtubePublication),freeze(stockSearch),freeze(exportVideoV210),freeze(exportVideo),freeze(exportAudio),freeze(motionGraphics),freeze(audioScore),freeze(shortFormFinish),freeze(shortFormFinishV102),freeze(shortFormFinishV101),freeze(shortFormFinishV100),freeze(occasionStory),freeze(occasionStoryV101),freeze(occasionStoryV100),freeze(releaseVisuals),freeze(releaseVisualsV101),freeze(releaseVisualsV100),freeze(photoReelComposer),freeze(photoReelComposerV101),freeze(photoReelComposerV100),freeze(importMediaV202),freeze(importMediaV201),freeze(editorV2212),freeze(editorV2211),freeze(editorV2210),freeze(editorV229),freeze(editorV228),freeze(panelStripV241),freeze(panelStripV240),freeze(panelStripV237),freeze(panelStripV236),freeze(boardEditorV2210),freeze(boardEditorV229),freeze(animatedSceneV238),freeze(animatedSceneV237),freeze(pipelineV225),freeze(pipelineV224),freeze(blueprintV219),freeze(blueprintV218),freeze(videoAssetsV214),freeze(videoAssetsV213),freeze(chatV203),freeze(chatV202),freeze(chatV201),freeze(shotPlanV221),freeze(shotPlanV220),freeze(shotPlanV213),freeze(shotPlanV212),freeze(voiceoverV216),freeze(voiceoverV215),freeze(voiceoverV214),freeze(voiceoverV213),freeze(scriptV215),freeze(scriptV214),freeze(scriptV213),freeze(roughCutV202),freeze(roughCutV201),freeze(finalEditV202),freeze(finalEditV201),freeze(editAssistantV202),freeze(editAssistantV201),freeze(gradeV202),freeze(gradeV201),freeze(transitionV202),freeze(transitionV201),freeze(qualityAuditV102),freeze(qualityAuditV101),freeze(compareV202),freeze(compareV201),freeze(compare),freeze(grade),freeze(transition),freeze(exportTimeline),freeze(captions),freeze(importMedia),freeze(generateImageV210),freeze(generateImage),freeze(thumbnailV201),freeze(thumbnail),freeze(writeSummary),freeze(automationWhen),freeze(automationNewItems),freeze(automationAiDecide),freeze(automationContinueIf),freeze(connectApp),freeze(automationContactFields),freeze(automationAiWrite),freeze(automationMetaCreative),freeze(voiceover),freeze(voiceoverV210),freeze(voiceoverV211),freeze(voiceoverV212),freeze(script),freeze(scriptV210),freeze(scriptV211),freeze(scriptV212),freeze(generateVideoV201),freeze(generateVideo),freeze(chat),freeze(characterV201),freeze(character),freeze(locationV201),freeze(location),freeze(styleV201),freeze(style),freeze(researchV202),freeze(researchV201),freeze(research),freeze(imageEditorV201),freeze(imageEditor),freeze(describeMediaV201),freeze(describeMedia),freeze(videoAssets),freeze(videoAssetsV210),freeze(videoAssetsV211),freeze(videoAssetsV212),freeze(roughCut),freeze(finalEdit),freeze(editAssistant),freeze(transcribeV201),freeze(transcribe),freeze(blueprint),freeze(blueprintV210),freeze(blueprintV211),freeze(blueprintV212),freeze(blueprintV213),freeze(blueprintV214),freeze(blueprintV215),freeze(blueprintV216),freeze(blueprintV217),freeze(shotPlan),freeze(shotPlanV210),freeze(shotPlanV211),freeze(boardEditor),freeze(boardEditorV210),freeze(boardEditorV220),freeze(boardEditorV221),freeze(boardEditorV222),freeze(boardEditorV223),freeze(boardEditorV224),freeze(boardEditorV225),freeze(boardEditorV226),freeze(boardEditorV227),freeze(boardEditorV228),freeze(panelStripV200),freeze(panelStrip),freeze(panelStripV220),freeze(panelStripV230),freeze(panelStripV231),freeze(panelStripV232),freeze(panelStripV233),freeze(panelStripV234),freeze(panelStripV235),freeze(animatedSceneV200),freeze(animatedScene),freeze(animatedSceneV220),freeze(animatedSceneV230),freeze(animatedSceneV231),freeze(animatedSceneV232),freeze(animatedSceneV233),freeze(animatedSceneV234),freeze(animatedSceneV235),freeze(animatedSceneV236),freeze(editor),freeze(editorV210),freeze(editorV220),freeze(editorV221),freeze(editorV222),freeze(editorV223),freeze(editorV224),freeze(editorV225),freeze(editorV226),freeze(editorV227),freeze(pipelineV200),freeze(pipeline),freeze(pipelineV220),freeze(pipelineV221),freeze(pipelineV223),freeze(pipelineV222),freeze(shotPlanAssistant),freeze(animatedSceneAssistant),freeze(blueprintAssistant),freeze(whiteboardAssistant),freeze(qualityAudit)]);
193
+ export const FIRST_PARTY_SDK_PACKAGES = Object.freeze([freeze(productAdVariants),freeze(pickPhotos),freeze(photoNotes),freeze(youtubePublication),freeze(stockSearch),freeze(exportVideoV210),freeze(exportVideo),freeze(exportAudio),freeze(motionGraphics),freeze(audioScore),freeze(shortFormFinish),freeze(screenRecorder),freeze(shortFormFinishV102),freeze(shortFormFinishV101),freeze(shortFormFinishV100),freeze(occasionStory),freeze(occasionStoryV101),freeze(occasionStoryV100),freeze(releaseVisuals),freeze(releaseVisualsV101),freeze(releaseVisualsV100),freeze(photoReelComposer),freeze(photoReelComposerV101),freeze(photoReelComposerV100),freeze(importMediaV202),freeze(importMediaV201),freeze(editorV2212),freeze(editorV2211),freeze(editorV2210),freeze(editorV229),freeze(editorV228),freeze(panelStripV241),freeze(panelStripV240),freeze(panelStripV237),freeze(panelStripV236),freeze(boardEditorV2210),freeze(boardEditorV229),freeze(animatedSceneV238),freeze(animatedSceneV237),freeze(pipelineV225),freeze(pipelineV224),freeze(blueprintV219),freeze(blueprintV218),freeze(videoAssetsV214),freeze(videoAssetsV213),freeze(chatV203),freeze(chatV202),freeze(chatV201),freeze(shotPlanV221),freeze(shotPlanV220),freeze(shotPlanV213),freeze(shotPlanV212),freeze(voiceoverV216),freeze(voiceoverV215),freeze(voiceoverV214),freeze(voiceoverV213),freeze(scriptV215),freeze(scriptV214),freeze(scriptV213),freeze(roughCutV202),freeze(roughCutV201),freeze(finalEditV202),freeze(finalEditV201),freeze(editAssistantV202),freeze(editAssistantV201),freeze(gradeV202),freeze(gradeV201),freeze(transitionV202),freeze(transitionV201),freeze(qualityAuditV102),freeze(qualityAuditV101),freeze(compareV202),freeze(compareV201),freeze(compare),freeze(grade),freeze(transition),freeze(exportTimeline),freeze(captions),freeze(importMedia),freeze(generateImageV210),freeze(generateImage),freeze(thumbnailV201),freeze(thumbnail),freeze(writeSummary),freeze(automationWhen),freeze(automationNewItems),freeze(automationAiDecide),freeze(automationContinueIf),freeze(connectApp),freeze(automationContactFields),freeze(automationAiWrite),freeze(automationMetaCreative),freeze(voiceover),freeze(voiceoverV210),freeze(voiceoverV211),freeze(voiceoverV212),freeze(script),freeze(scriptV210),freeze(scriptV211),freeze(scriptV212),freeze(generateVideoV201),freeze(generateVideo),freeze(chat),freeze(characterV201),freeze(character),freeze(locationV201),freeze(location),freeze(styleV201),freeze(style),freeze(researchV202),freeze(researchV201),freeze(research),freeze(imageEditorV201),freeze(imageEditor),freeze(describeMediaV201),freeze(describeMedia),freeze(videoAssets),freeze(videoAssetsV210),freeze(videoAssetsV211),freeze(videoAssetsV212),freeze(roughCut),freeze(finalEdit),freeze(editAssistant),freeze(transcribeV201),freeze(transcribe),freeze(blueprint),freeze(blueprintV210),freeze(blueprintV211),freeze(blueprintV212),freeze(blueprintV213),freeze(blueprintV214),freeze(blueprintV215),freeze(blueprintV216),freeze(blueprintV217),freeze(shotPlan),freeze(shotPlanV210),freeze(shotPlanV211),freeze(boardEditor),freeze(boardEditorV210),freeze(boardEditorV220),freeze(boardEditorV221),freeze(boardEditorV222),freeze(boardEditorV223),freeze(boardEditorV224),freeze(boardEditorV225),freeze(boardEditorV226),freeze(boardEditorV227),freeze(boardEditorV228),freeze(panelStripV200),freeze(panelStrip),freeze(panelStripV220),freeze(panelStripV230),freeze(panelStripV231),freeze(panelStripV232),freeze(panelStripV233),freeze(panelStripV234),freeze(panelStripV235),freeze(animatedSceneV200),freeze(animatedScene),freeze(animatedSceneV220),freeze(animatedSceneV230),freeze(animatedSceneV231),freeze(animatedSceneV232),freeze(animatedSceneV233),freeze(animatedSceneV234),freeze(animatedSceneV235),freeze(animatedSceneV236),freeze(editor),freeze(editorV210),freeze(editorV220),freeze(editorV221),freeze(editorV222),freeze(editorV223),freeze(editorV224),freeze(editorV225),freeze(editorV226),freeze(editorV227),freeze(pipelineV200),freeze(pipeline),freeze(pipelineV220),freeze(pipelineV221),freeze(pipelineV223),freeze(pipelineV222),freeze(shotPlanAssistant),freeze(animatedSceneAssistant),freeze(blueprintAssistant),freeze(whiteboardAssistant),freeze(qualityAudit)]);
193
194
  export const firstPartySdkPackage = manifest => FIRST_PARTY_SDK_PACKAGES.find(pkg => pkg.manifest.id === manifest?.id && pkg.manifest.version === manifest?.version);
@@ -40,7 +40,7 @@ export const VIEW_BRIDGE=Object.freeze([
40
40
  {name:'onSharedWorkRefresh',group:'Connected work',signature:'onSharedWorkRefresh(callback: () => void): () => void',summary:'Called when shared work changes elsewhere; read it again.',where:saved},
41
41
  {name:'previewSharedWorkMedia',group:'Connected work',signature:'previewSharedWorkMedia(contributionId: string): Promise<{url: string; kind: "image" | "video" | "audio"}>',summary:'A display copy of media attached to a shared work contribution.',where:saved},
42
42
  {name:'releaseSharedWorkMedia',group:'Connected work',signature:'releaseSharedWorkMedia(url: string): void',summary:'Frees a URL previewSharedWorkMedia returned.',where:saved},
43
- {name:'desktop',group:'Connected work',signature:'desktop(operation: string, args?: Record<string, unknown>): Promise<Record<string, unknown>>',summary:'Runs a declared desktop permission (screen or camera capture, clipboard, native tools) after the person grants it.',where:desktop},
43
+ {name:'desktop',group:'Connected work',signature:'desktop(operation: string, args?: Record<string, unknown>): Promise<Record<string, unknown>>',summary:'Runs a declared desktop permission after the person grants it. Recording (record.start, record.stop, record.cancel, record.status) and cutting a recording (record.cut) work in browsers and in StillMade Desktop; clipboard, media.pick, notifications, keep-awake and native tools need StillMade Desktop.',where:`${all} for recording; ${desktop} for the rest`},
44
44
  ]);
45
45
  export const VIEW_BRIDGE_MEMBERS=Object.freeze(VIEW_BRIDGE.map(member=>member.name));
46
46