@punica/editor 1.35.0 → 1.37.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.35.0",
3
+ "version": "1.37.0",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -44,7 +44,8 @@
44
44
  "test:host:ui": "vitest --ui --config vitest.host.config.ts",
45
45
  "format": "prettier --write \"./**/*.{ts,js,json,md}\"",
46
46
  "prepare": "husky install",
47
- "report:progress-envelopes": "node scripts/report-progress-envelopes.mjs"
47
+ "report:progress-envelopes": "node scripts/report-progress-envelopes.mjs",
48
+ "report:ui-reveal-drift": "node scripts/report-ui-reveal-drift.mjs"
48
49
  },
49
50
  "eslintIgnore": [
50
51
  "node_modules",
package/types/index.d.ts CHANGED
@@ -254,6 +254,43 @@ export function emitShellEvent(opts: ShellEventOptions): boolean;
254
254
  */
255
255
  export const WORKSPACE_STATE_GITIGNORE: string;
256
256
 
257
+ /**
258
+ * The agent-mode policy profile: what the gate does with a call whose actor
259
+ * is `ai`, before any `.punica/policy.yaml` rule is consulted. The default
260
+ * holds every `write` and every `high`-risk call for a person and auto-runs
261
+ * the rest; a host may install its own with `setAgentPolicyProfile`. Exported
262
+ * so a host that explains a verdict without dispatching reads the same
263
+ * function the gate reads.
264
+ */
265
+ export type AgentPolicyDecision = 'auto' | 'approval';
266
+ export type AgentPolicyRisk = 'low' | 'medium' | 'high';
267
+ export type AgentPolicySideEffect = 'none' | 'read' | 'write' | 'network';
268
+ export interface AgentPolicyProfileInput {
269
+ capabilityId: string;
270
+ risk: AgentPolicyRisk;
271
+ sideEffect: AgentPolicySideEffect;
272
+ }
273
+ export type AgentPolicyProfile = (input: AgentPolicyProfileInput) => AgentPolicyDecision;
274
+ export const defaultAgentPolicyProfile: AgentPolicyProfile;
275
+ export function getAgentPolicyProfile(): AgentPolicyProfile;
276
+ export function setAgentPolicyProfile(profile: AgentPolicyProfile | undefined): void;
277
+
278
+ /**
279
+ * The gate's classifier from a declaration's `sideEffects` array to the one
280
+ * side effect the agent-mode profile reads: `write` beats `network` beats
281
+ * `read` beats `none`.
282
+ */
283
+ export function sideEffectArrayToEnum(values: string[] | undefined): AgentPolicySideEffect;
284
+
285
+ /**
286
+ * Whether critical events are written to the workspace's `.punica/events`.
287
+ * On by default. A host turns it off before `initialize()` for a boot that
288
+ * only reads, so the boot leaves no file behind; publishing, subscriptions
289
+ * and the in-memory audit ring are unaffected.
290
+ */
291
+ export function setEventPersistence(enabled: boolean): void;
292
+ export function isEventPersistenceEnabled(): boolean;
293
+
257
294
  /** The core-owned ApplicationProfile mechanism (`punica.shell.Profile`). */
258
295
  export const Profile: {
259
296
  readonly manager: import('punica').shell.Profile.IProfileManager;
@@ -213,7 +213,8 @@ declare module 'punica' {
213
213
  | 'memory.write'
214
214
  | 'vcs.read'
215
215
  | 'vcs.write'
216
- | 'flow.run';
216
+ | 'flow.run'
217
+ | 'ui.reveal';
217
218
 
218
219
  /**
219
220
  * Unified Capability Definition - Base interface for all capability types.
@@ -358,6 +359,26 @@ declare module 'punica' {
358
359
  */
359
360
  tags?: string[];
360
361
 
362
+ /**
363
+ * Where this capability is LISTED. `hub-only` says a family hub id is the
364
+ * agent's front door for this action, and this engine-tier id is not put
365
+ * in the default agent catalog or offered by `capability.search`.
366
+ *
367
+ * It changes listing, never reach: the id stays fully callable through the
368
+ * gateway, stays in `capability.catalog`, and `capability.describe` still
369
+ * answers for it when a caller names it.
370
+ *
371
+ * Declare it only where a hub id performs the SAME action — four
372
+ * `object-storage.<engine>.deleteObject` ids whose description is the
373
+ * hub's, word for word. An engine id that does something of its own
374
+ * (`mlops.dvc.repro`) is not hub-only, and a declaration that marks
375
+ * everything is no more informative than one that marks nothing.
376
+ *
377
+ * Omitted means `default`. Extension-origin only: `CapabilitySpec` drops
378
+ * consumer-facing metadata, so a core capability cannot carry it.
379
+ */
380
+ agentVisibility?: 'default' | 'hub-only';
381
+
361
382
  /**
362
383
  * Execution defaults for this capability.
363
384
  * These defaults are applied unless overridden at workflow node or run level.