@agentproto/app-kit 1.4.1 → 1.6.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 CHANGED
@@ -140,7 +140,7 @@ runtime app registry:
140
140
  /apps/:appId/ui`, the MCP panel cache, and `agentproto app serve` all call
141
141
  the same `ensureAppUiBuilt` (`@agentproto/runtime/app-ui-build`) before
142
142
  serving, single-flight per bundle path so concurrent first requests only
143
- build once. Output is captured to `<appDir>/.agentproto/ui-build.log`; a
143
+ build once. Output is captured to `~/.agentproto/logs/app-ui-build/<app>-<hash>.log`; a
144
144
  failing build surfaces that log's tail as the tool/route error instead of
145
145
  a bare 404. No `ui.build` declared ⇒ today's behavior: the bundle must
146
146
  already exist on disk.
@@ -394,7 +394,7 @@ ui:
394
394
  `agentproto app serve` all resolve this the same way (`peekAppUi` +
395
395
  `ensureAppUiBuilt` from `@agentproto/runtime/app-ui-build`): missing or
396
396
  older than the newest matching source → run `command` once (single-flight
397
- per bundle path, output captured to `.agentproto/ui-build.log`) → serve.
397
+ per bundle path, output captured to `~/.agentproto/logs/app-ui-build/`) → serve.
398
398
  Omit `build` to keep committing the bundle, unchanged from before this
399
399
  existed.
400
400
 
@@ -17,10 +17,18 @@
17
17
  * an orphan (a bundled workflow no agent lists) throws — that is what "an
18
18
  * agent attached to its workflows" means, made checkable.
19
19
  */
20
- import type { AppDefinition, AppHandle, DoctypeHandle } from "./types.js";
20
+ import type { AppDefinition, AppHandle, DoctypeHandle, OpenAIAppUiExtension } from "./types.js";
21
21
  export declare class AppDefinitionError extends Error {
22
22
  constructor(message: string);
23
23
  }
24
24
  export declare function defineApp(def: AppDefinition): AppHandle;
25
+ /**
26
+ * The single `ui.extensions.openai` validator/normalizer, shared by TS
27
+ * authoring (`defineApp`) and manifest loading (`loadAppHandle` re-runs
28
+ * through `defineApp`), so there is no hand-maintained duplicate. Normalizes
29
+ * file entrypoint extensions to lowercase; validates every shape/range rule
30
+ * with the exact `ui.extensions.openai.*` field path.
31
+ */
32
+ export declare function normalizeOpenAIUiExtension(raw: unknown, tools: readonly string[] | undefined, fail: (message: string) => Error): OpenAIAppUiExtension | undefined;
25
33
  export type { DoctypeHandle };
26
34
  //# sourceMappingURL=define-app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"define-app.d.ts","sourceRoot":"","sources":["../src/define-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAEV,aAAa,EACb,SAAS,EACT,aAAa,EAGd,MAAM,YAAY,CAAA;AAKnB,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,CAyKvD;AAiID,YAAY,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"define-app.d.ts","sourceRoot":"","sources":["../src/define-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,OAAO,KAAK,EAEV,aAAa,EACb,SAAS,EAET,aAAa,EACb,oBAAoB,EAKrB,MAAM,YAAY,CAAA;AAKnB,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,CA+LvD;AA8JD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EACpC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,GAC/B,oBAAoB,GAAG,SAAS,CAsBlC;AAmPD,YAAY,EAAE,aAAa,EAAE,CAAA"}
package/dist/emit.d.ts CHANGED
@@ -32,7 +32,7 @@
32
32
  */
33
33
  import type { WorkflowHandle } from "@agentproto/workflow";
34
34
  import type { WorkspaceHandle } from "@agentproto/workspace";
35
- import type { AgentEntry, AppAccepts, AppArtifactDecl, AppArtifactSurface, AppBoundariesDefinition, AppDataDefinition, AppDevDefinition, AppExposes, AppPlacement, AppRequirements, AppSkillSurface, AppUiDefinition, EmittedApp } from "./types.js";
35
+ import type { AgentEntry, AppAccepts, AppArtifactDecl, AppArtifactSurface, AppBoundariesDefinition, AppDataDefinition, AppDevDefinition, AppExposes, AppPlacement, AppRequirement, AppRequirements, AppSkillSurface, AppUiDefinition, EmittedApp } from "./types.js";
36
36
  interface EmitInput {
37
37
  readonly agents: readonly AgentEntry[];
38
38
  readonly workflows: readonly WorkflowHandle[];
@@ -43,6 +43,7 @@ interface EmitInput {
43
43
  readonly description?: string;
44
44
  readonly requires?: readonly string[];
45
45
  readonly requirements?: AppRequirements;
46
+ readonly appRequirements?: readonly AppRequirement[];
46
47
  readonly placement?: AppPlacement;
47
48
  readonly exposes?: AppExposes;
48
49
  readonly accepts?: AppAccepts;
@@ -1 +1 @@
1
- {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../src/emit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAGpP,UAAU,SAAS;IACjB,QAAQ,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAA;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAA;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAA;IACpC,QAAQ,CAAC,EAA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;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,uBAAuB,CAAA;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAwH9E"}
package/dist/index.d.ts CHANGED
@@ -41,8 +41,9 @@ export { emitApp } from "./emit.js";
41
41
  export { loadAppHandle, AppLoadError, resolveAppUIRoot, peekAppUi } from "./load-app.js";
42
42
  export type { AppUiPeek } from "./load-app.js";
43
43
  export { loadAppBundledTools } from "./load-app-tools.js";
44
- export { packApp, unpackApp, aggregateSha256, collectFiles, isManifest, safeId, AGENTAPP_FORMAT, AgentAppPackError, } from "./pack.js";
45
- export type { AgentAppManifest, BundleFile, AgentAppPackErrorCode } from "./pack.js";
44
+ export { packApp, unpackApp, aggregateSha256, collectFiles, isManifest, safeId, AGENTAPP_FORMAT, AgentAppPackError, RELEASE_DEFAULT_EXCLUDE, globToRegExp, readPackageRules, } from "./pack.js";
45
+ export type { AgentAppManifest, BundleFile, AgentAppPackErrorCode, AppPackageRules } from "./pack.js";
46
46
  export { refKey, stripOwner } from "./refs.js";
47
- export type { AppDefinition, AppHandle, AgentEntry, DoctypeHandle, WorkspaceShorthand, WorkspaceInput, AppUiDefinition, AppUiBuildConfig, AppArtifactSurface, AppSkillSurface, AppArtifactDecl, AppDevLaunchConfig, AppBoundariesDefinition, AppDataDefinition, AppDevDefinition, AppPlacement, AppRequirements, AppExposes, AppAccepts, ToMastraAgentOptions, EmittedApp, } from "./types.js";
47
+ export { versionSatisfies } from "./version-range.js";
48
+ export type { AppDefinition, AppHandle, AgentEntry, DoctypeHandle, WorkspaceShorthand, WorkspaceInput, AppUiDefinition, AppUiBuildConfig, OpenAIAppUiExtension, OpenAIEntrypoint, OpenAIIcon, AppArtifactSurface, AppSkillSurface, AppArtifactDecl, AppDevLaunchConfig, AppBoundariesDefinition, AppDataDefinition, AppDevDefinition, AppPlacement, AppRequirements, AppRequirement, AppRequirementEntry, AppExposes, AppAccepts, ToMastraAgentOptions, EmittedApp, } from "./types.js";
48
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACxF,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,YAAY,EACZ,UAAU,EACV,MAAM,EACN,eAAe,EACf,iBAAiB,GAClB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACpF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC9C,YAAY,EACV,aAAa,EACb,SAAS,EACT,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,UAAU,GAC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