@punica/editor 1.34.1 → 1.36.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
package/types/index.d.ts
CHANGED
|
@@ -246,6 +246,51 @@ export interface ShellEventOptions {
|
|
|
246
246
|
/** Best-effort kernel-event emit from the shell/profile layer. */
|
|
247
247
|
export function emitShellEvent(opts: ShellEventOptions): boolean;
|
|
248
248
|
|
|
249
|
+
/**
|
|
250
|
+
* The body the substrate seeds `.punica/.gitignore` with: everything under
|
|
251
|
+
* `.punica/` ignored, then an allowlist of authored files. A host writing a
|
|
252
|
+
* project's governance files before it boots (`ivyx init`) writes this
|
|
253
|
+
* rather than its own copy.
|
|
254
|
+
*/
|
|
255
|
+
export const WORKSPACE_STATE_GITIGNORE: string;
|
|
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
|
+
|
|
249
294
|
/** The core-owned ApplicationProfile mechanism (`punica.shell.Profile`). */
|
|
250
295
|
export const Profile: {
|
|
251
296
|
readonly manager: import('punica').shell.Profile.IProfileManager;
|