Repository navigation
Mac AI conversation: streaming, three sizes, declared network use (phase 2a) - #86
Merged
Merged
Conversation
The reply is read as server-sent events and its code is shown while it is written. A server that refuses or ignores the streamed form is asked again in the plain form as long as nothing was received. The preview draws the widget at Small, Medium and Large under the chosen size; a click switches. A size larger than the area is scaled to fit. A widget that uses the network must end its reply with the declaration the Android app already uses. It is untrusted: only the network permission and up to eight hosts, checked by the manifest validator; an invalid one is not run and goes back for repair. The conversation's sandbox now carries a Package 2.0 widget.json with no permission or with the declared hosts, so the preview is held to what the saved widget gets. Before, the preview was a legacy package with open network access and the saved widget had none. Saving asks first and writes the permission into the new widget. The earlier single request and the editor Copilot are unchanged and still run in a package without widget.json. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Owner
Author
|
Real model, on this Mac, with this branch: DeepSeek
Not established by this: whether the fetch in the preview returned a UUID or the widget drew its fallback message; the test checks that the code ran and what it declared, not what it showed. In the three-turn run the model wrote its notes in Chinese although the requests were English. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the user gets
Second step of the AI conversation on the Mac (first step: #85).
widget.json.Both pictures are captures of the running app against a local stand-in provider.
Not in this pull request: the same conversation in the editor's Copilot panel. It is the remaining part of phase 2 and needs a signed build with a widget library to try; see below. No linked issue.
Security and compatibility
permissions: ["network"]and 1 to 8 hosts, unknown keys rejected, thenWidgetPackageManifestValidator. An invalid declaration is not run; the reason goes back to the model as a repair.widget.jsonwith no permission, or with the network permission for the declared hosts. Before, it had no manifest and the runtime treated it as a legacy package with open network access, while the saved widget had none. Preview and saved widget now get the same.ScriptWidgetPackage.writeManifest, which validates again. Private and local hosts stay blocked by the runtime.AgentRuntimeBridge.rungains an optional manifest; without it nothing changes. The earlier single request (iPhone, iPad) and the editor Copilot are unchanged and still run withoutwidget.json.AIConversationVersiongains an optionalnetworkDomains; conversation files written by Mac: AI generation as a conversation with versions and drafts (phase 1) #85 still load.What ran, on this Mac
ScriptWidgetRuntimeTests, macOS, whole suite: 837 tests, 803 passed, 34 skipped, 0 failed.AIConversationTestshas 28, of which 26 ran (the live-provider and snapshot tests are opt-in).ScriptWidgetMacbuild andScriptWidget(iOS) simulator build: succeeded.AIConversationTestsandAIGenerationTests: 42 tests, 37 passed, 5 skipped, 0 failed.node Scripts/validate-doc-links.mjs: passed.What did not run
./Scripts/release-readiness.shas a whole: no JavaScript changed and the worktree has nonode_modules. The rest of the iOS suite was not run.🤖 Generated with Claude Code