afterpresets 0.2.0 → 0.4.0
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/README.md +9 -6
- package/native-runtime/CMakeLists.txt +82 -0
- package/native-runtime/README.md +40 -0
- package/native-runtime/THIRD_PARTY_NOTICES.md +14 -0
- package/native-runtime/include/ap_native.h +223 -0
- package/native-runtime/src/apply.cpp +199 -0
- package/native-runtime/src/crypto.cpp +225 -0
- package/native-runtime/src/crypto.hpp +51 -0
- package/native-runtime/src/dialog.cpp +62 -0
- package/native-runtime/src/dialog.hpp +35 -0
- package/native-runtime/src/engine.cpp +909 -0
- package/native-runtime/src/engine.hpp +232 -0
- package/native-runtime/src/fsutil.cpp +291 -0
- package/native-runtime/src/fsutil.hpp +57 -0
- package/native-runtime/src/json.cpp +326 -0
- package/native-runtime/src/json.hpp +70 -0
- package/native-runtime/src/platform.hpp +83 -0
- package/native-runtime/src/platform_common.cpp +60 -0
- package/native-runtime/src/platform_mac.mm +314 -0
- package/native-runtime/src/platform_win.cpp +277 -0
- package/native-runtime/src/runtime.cpp +473 -0
- package/native-runtime/src/util.cpp +169 -0
- package/native-runtime/src/util.hpp +32 -0
- package/native-runtime/src/zip.cpp +243 -0
- package/native-runtime/src/zip.hpp +58 -0
- package/native-runtime/third_party/monocypher/LICENCE.md +167 -0
- package/native-runtime/third_party/monocypher/monocypher-ed25519.c +500 -0
- package/native-runtime/third_party/monocypher/monocypher-ed25519.h +140 -0
- package/native-runtime/third_party/monocypher/monocypher.c +2956 -0
- package/native-runtime/third_party/monocypher/monocypher.h +321 -0
- package/native-runtime/third_party/tinf/LICENSE +22 -0
- package/native-runtime/third_party/tinf/crc32.c +57 -0
- package/native-runtime/third_party/tinf/tinf.h +140 -0
- package/native-runtime/third_party/tinf/tinflate.c +636 -0
- package/native-runtime/vendor-files.json +39 -0
- package/package.json +7 -4
- package/runtime/docs/cep/host-after-effects.md +3 -3
- package/runtime/docs/cep/host-premiere.md +4 -4
- package/runtime/docs/cep/host.md +10 -2
- package/runtime/docs/common/README.md +1 -1
- package/runtime/docs/native/README.md +44 -0
- package/runtime/docs/native/debugging.md +140 -0
- package/runtime/docs/native/rules.md +402 -0
- package/runtime/docs/native/testing.md +154 -0
- package/runtime/package.json +1 -1
- package/runtime/scripts/ae-sdk-docs/config.js +102 -0
- package/runtime/scripts/ae-sdk-docs/convert.js +430 -0
- package/runtime/scripts/ae-sdk-docs/index.js +314 -0
- package/runtime/scripts/ae-sdk-docs/source.js +205 -0
- package/runtime/scripts/ae-sdk-docs/split.js +170 -0
- package/runtime/scripts/ae-sdk-docs.js +72 -0
- package/runtime/src/host.js +1 -1
- package/src/agent/cli-group.js +9 -0
- package/src/agent/extendscript.js +10 -0
- package/src/agent/host-target.js +1 -0
- package/src/agent/panels.js +1 -0
- package/src/agent/png.js +1 -0
- package/src/agent/run-tool.js +3 -0
- package/src/{mcp → agent}/snapshot.js +2 -2
- package/src/agent/tool-error.js +1 -0
- package/src/agent/tools/capture.js +3 -0
- package/src/agent/tools/host.js +1 -0
- package/src/agent/tools/native.js +1 -0
- package/src/agent/tools/panel.js +7 -0
- package/src/agent/tools.js +2 -0
- package/src/api/error-messages.js +1 -1
- package/src/build/build.js +9 -8
- package/src/check/check.js +3 -3
- package/src/check/native.js +14 -0
- package/src/check/pricing.js +1 -1
- package/src/cli.js +3 -3
- package/src/commands/build.js +8 -2
- package/src/commands/check.js +10 -2
- package/src/commands/comp.js +6 -0
- package/src/commands/dev.js +29 -2
- package/src/commands/docs.js +5 -1
- package/src/commands/host.js +1 -0
- package/src/commands/init.js +12 -7
- package/src/commands/panel.js +1 -0
- package/src/commands/push.js +9 -2
- package/src/commands/releases.js +8 -3
- package/src/commands/sdk.js +14 -0
- package/src/commands/testers.js +1 -1
- package/src/commands/upgrade.js +2 -2
- package/src/commands/whoami.js +1 -1
- package/src/dev/bridge.js +8 -0
- package/src/dev/native.js +3 -0
- package/src/dev/session.js +5 -4
- package/src/native/build.js +27 -0
- package/src/native/cmake/CMakeLists.txt +88 -0
- package/src/native/cmake/zig-windows.cmake +19 -0
- package/src/native/effect.js +3 -0
- package/src/native/install.js +8 -0
- package/src/native/installers.js +4 -0
- package/src/native/pipl.js +20 -0
- package/src/native/restart.js +2 -0
- package/src/native/sdk.js +8 -0
- package/src/project/docs.js +3 -3
- package/src/project/project.js +2 -2
- package/src/project/template.js +5 -4
- package/src/prompt.js +1 -1
- package/src/release/confirm.js +5 -0
- package/src/release/native.js +3 -0
- package/src/release/publish.js +1 -1
- package/src/system/run-command.js +1 -1
- package/src/targets.js +1 -1
- package/template/cep/AGENTS.md +102 -164
- package/template/cep/README.md +7 -3
- package/template/cep/docs/code_guide.md +67 -0
- package/template/cep/docs/initial_setup.md +63 -42
- package/template/cep/docs/release_checklist.md +25 -0
- package/template/cep/gitignore +2 -1
- package/template/cep/src/features/update-screen/update-screen.js +1 -1
- package/template/hosts/AGENTS.two-apps.md +12 -0
- package/template/native/AGENTS.md +106 -0
- package/template/native/README.md +71 -0
- package/template/native/docs/code_guide.md +72 -0
- package/template/native/docs/initial_setup.md +154 -0
- package/template/native/docs/release_checklist.md +25 -0
- package/template/native/effect.json +16 -0
- package/template/native/gitignore +9 -0
- package/template/native/package.json +14 -0
- package/template/native/src/Effect.cpp +224 -0
- package/template/native/src/License.cpp +95 -0
- package/template/native/src/License.h +29 -0
- package/template/native/src/Render.h +68 -0
- package/src/commands/mcp.js +0 -7
- package/src/mcp/extendscript.js +0 -9
- package/src/mcp/panels.js +0 -1
- package/src/mcp/protocol.js +0 -4
- package/src/mcp/server.js +0 -2
- package/src/mcp/tools/account.js +0 -3
- package/src/mcp/tools/host.js +0 -1
- package/src/mcp/tools/panel.js +0 -7
- package/src/mcp/tools/project.js +0 -40
- package/src/mcp/tools/releases.js +0 -29
- package/template/cep/.mcp.json +0 -8
- /package/src/{mcp → agent}/capture.js +0 -0
- /package/src/{mcp → agent}/redact.js +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";const N=require("crypto"),H=require("../../project/semver"),{apiSession:j,productPath:m}=require("../../api/session"),{quietContext:O}=require("../capture"),{ToolError:u}=require("../protocol"),{CHANNELS:y,BUMPS:P,validateChangelog:_,preparePush:A,checkPushQuota:k,runPush:C}=require("../../release/publish"),L=600*1e3,M=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,T={type:"string",description:"Token from the previous call's summary, after the user approved it."};function g(l){return l&&(l.version||l.releaseVersion)||l||null}function q(l){const s=l&&l.pushes||{},p=s.limit===null||s.limit===void 0?"unlimited":s.limit;return"Production pushes this month: "+(s.used||0)+" / "+p+" (this one would be "+((s.used||0)+1)+")."}module.exports=function(s){const p=new Map;function w(e){const t=N.randomBytes(9).toString("base64url");return p.set(t,{key:e,expires:s.ctx.now()+L}),t}function b(e,t){const n=e?p.get(String(e)):null;return n?(p.delete(String(e)),n.key===t&&n.expires>s.ctx.now()):!1}function d(){return j(s.ctx)}async function S(e,t,n){const o=await d().put(m(e)+"/channels/"+t+"/head",{version:n});return g(o.head)||n}return[{name:"releases_list",title:"List releases",description:"The production and test channel heads and every release of this product, newest first.",inputSchema:{type:"object",properties:{}},annotations:{readOnlyHint:!0,openWorldHint:!0},async handler(){const e=s.project(),t=await d().get(m(e.settings.bundleId)),n=t.heads||{};return{production:g(n.production),test:g(n.test),releases:(t.releases||[]).map(o=>({version:o.version,pushedTo:o.channelPushed||null,date:o.createdAt?String(o.createdAt).slice(0,10):null,changelog:String(o.changeLog||"").slice(0,300)}))}}},{name:"push",title:"Publish a release",description:'Runs `ap push`: check, version bump, build, server obfuscation, upload, signing. Only when the user asks to publish. channel "test" (testers only) publishes right away. channel "production" (every buyer, counts toward the monthly quota, emails the user) first returns a summary and confirmToken: show the summary to the user, and only after they approve call push again with the same arguments plus confirmToken. Do not retry a push that timed out or lost its answer: call releases_list to see whether it landed.',inputSchema:{type:"object",properties:{channel:{type:"string",enum:y},bump:{type:"string",enum:P,description:"Default patch."},changelog:{type:"string",description:"What changed, for buyers (shown in the update screen)."},confirmToken:T},required:["channel","changelog"]},annotations:{destructiveHint:!0,openWorldHint:!0},async handler(e){const t=String(e.channel),n=e.bump?String(e.bump):"patch";if(y.indexOf(t)===-1)throw new u("channel must be test or production.");if(P.indexOf(n)===-1)throw new u("bump must be patch, minor or major.");const o=_(e.changelog);if(o)throw new u(o);const i=String(e.changelog),r=s.project(),c=O(s.ctx,{cwd:r.root}),h=j(c);let f;try{f=await A(c,h,r)}catch(a){throw new u(c.out.text()+`
|
|
2
|
-
`+a.message)}const v=H.bump(f.base,n),x=JSON.stringify(["push",r.settings.bundleId,t,v,i]);if(t==="production"){if(!b(e.confirmToken,x)){const a=await k(h),I=w(x);return(e.confirmToken?`That confirmToken is expired or was for a different push, so nothing was published.
|
|
3
|
-
|
|
4
|
-
`:"")+`Nothing published yet. Show this to the user and ask them to approve:
|
|
5
|
-
|
|
6
|
-
Product: `+r.settings.name+" ("+r.settings.bundleId+`)
|
|
7
|
-
Version: `+f.base+" -> "+v+`
|
|
8
|
-
Channel: production (every buyer gets it on their next update check)
|
|
9
|
-
Changelog: `+i.split(`
|
|
10
|
-
`).join(`
|
|
11
|
-
`)+`
|
|
12
|
-
`+q(a)+`
|
|
13
|
-
`+(c.out.text()?`
|
|
14
|
-
Check output:
|
|
15
|
-
`+c.out.text()+`
|
|
16
|
-
`:"")+`
|
|
17
|
-
After they approve, call push with the same arguments and confirmToken: "`+I+'" (valid 10 minutes).'}await k(h)}try{const a=await C(c,h,r,{details:f.details,version:v,channel:t,changeLog:i});return"Published "+r.settings.bundleId+" "+a.version+" on "+t+`.
|
|
18
|
-
afterpresets.json is now at `+a.version+`; commit it.
|
|
19
|
-
`+(t==="test"?"Testers get it on their next update check. Promote it with release_promote.":"Buyers get it on their next update check. AfterPresets emailed the user a confirmation.")+(a.listingUrl?`
|
|
20
|
-
Listing: `+a.listingUrl:"")+`
|
|
21
|
-
|
|
22
|
-
`+c.out.text()}catch(a){throw new u(c.out.text()+`
|
|
23
|
-
`+a.message+(a.hint?`
|
|
24
|
-
`+a.hint:"")+`
|
|
25
|
-
Call releases_list before trying again, in case the release landed.`)}}},{name:"release_promote",title:"Promote to production",description:"Points production at a release that was pushed to test (every buyer gets it; counts toward the quota). The first call returns a summary and confirmToken; call again with the token only after the user approves.",inputSchema:{type:"object",properties:{version:{type:"string"},confirmToken:T},required:["version"]},annotations:{destructiveHint:!0,openWorldHint:!0},async handler(e){const t=s.project(),n=String(e.version),o=JSON.stringify(["promote",t.settings.bundleId,n]);if(!b(e.confirmToken,o)){const i=await d().get(m(t.settings.bundleId));if(!(i.releases||[]).find(h=>h.version===n))throw new u("No release "+n+". Use releases_list.");const c=await k(d());return"Nothing changed yet. Ask the user to approve: production "+(g((i.heads||{}).production)||"(none)")+" -> "+n+`.
|
|
26
|
-
`+q(c)+`
|
|
27
|
-
Then call release_promote with confirmToken: "`+w(o)+'" (valid 10 minutes).'}return"Production now serves "+await S(t.settings.bundleId,"production",n)+". AfterPresets emailed the user."}},{name:"release_rollback",title:"Roll back a channel",description:"Points a channel (default production) at an older release; does not count toward the quota. On production the first call returns a summary and confirmToken; call again with the token only after the user approves. The test channel moves right away.",inputSchema:{type:"object",properties:{version:{type:"string"},channel:{type:"string",enum:y},confirmToken:T},required:["version"]},annotations:{destructiveHint:!0,openWorldHint:!0},async handler(e){const t=s.project(),n=String(e.version),o=e.channel?String(e.channel):"production";if(y.indexOf(o)===-1)throw new u("channel must be test or production.");const i=JSON.stringify(["rollback",t.settings.bundleId,o,n]);if(o==="production"&&!b(e.confirmToken,i)){const r=await d().get(m(t.settings.bundleId));return"Nothing changed yet. Ask the user to approve rolling production back: "+(g((r.heads||{}).production)||"(none)")+" -> "+n+`.
|
|
28
|
-
Then call release_rollback with confirmToken: "`+w(i)+'" (valid 10 minutes).'}return o+" now serves "+await S(t.settings.bundleId,o,n)+"."}},{name:"testers",title:"Manage testers",description:"Lists, adds or removes testers (up to 10 per extension). Testers get test-channel releases.",inputSchema:{type:"object",properties:{action:{type:"string",enum:["list","add","remove"]},email:{type:"string"}},required:["action"]},annotations:{openWorldHint:!0},async handler(e){const t=s.project(),n=m(t.settings.bundleId)+"/testers";if(e.action==="list"){const i=(await d().get(n)).testers||[];return i.length?i.map(r=>typeof r=="string"?r:r.email).join(`
|
|
29
|
-
`):"No testers yet."}const o=String(e.email||"").trim().toLowerCase();if(!M.test(o))throw new u("Pass a valid email.");if(e.action==="add")return await d().post(n,{email:o}),"Added "+o+" as a tester.";if(e.action==="remove")return await d().del(n,{email:o}),"Removed "+o+".";throw new u("action must be list, add or remove.")}}]};
|
package/template/cep/.mcp.json
DELETED
|
File without changes
|
|
File without changes
|