@chatpanel/events 0.6.0 → 0.7.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/capability.js CHANGED
@@ -11,8 +11,9 @@
11
11
  // failure mode this exists to prevent.
12
12
 
13
13
  import { CLASSES, EFFECTS, EGRESS, ACTOR_KINDS, SCOPE_KINDS, EventError } from './event.js';
14
+ import { DATA_SCOPES } from './scopes.js';
14
15
 
15
- export const DATA_SCOPES = Object.freeze(['notes', 'meetings', 'chats', 'page', 'files', 'net']);
16
+ export { DATA_SCOPES } from './scopes.js';
16
17
 
17
18
  const str = (v) => typeof v === 'string' && v.length > 0;
18
19
  const strs = (v, allowed = null) => Array.isArray(v) && v.every((x) => str(x) && (!allowed || allowed.includes(x)));
package/index.js CHANGED
@@ -19,7 +19,7 @@ export { REF_KINDS, RESOLUTION, makeRef, isRef, resolveRef } from './ref.js';
19
19
  export { linearize, compareEvents, causesAreWellFormed } from './order.js';
20
20
  export { UPCASTERS, upcast, upcastAll } from './upcast.js';
21
21
  export {
22
- DATA_SCOPES, validateCapability, validateInvocation, canSatisfy,
22
+ validateCapability, validateInvocation, canSatisfy,
23
23
  toModelSchema, toModelSchemas,
24
24
  } from './capability.js';
25
25
  export { checkInvariants, INVARIANTS } from './invariants.js';
@@ -43,6 +43,7 @@ export { createManifest, ManifestError, SOURCES } from './manifest.js';
43
43
  export { createKernel, meetDecisions, KernelError, REQUIRED_PLUGINS, ALLOW_ALL } from './kernel.js';
44
44
  export { replay, formatReport, parseJsonl, toJsonl } from './harness.js';
45
45
  export { compileQuery, findMatches, matchIndexFor, expandReplacement, replaceMatch, replaceAll, replaceAllInRange, MAX_MATCHES } from './text-search.js';
46
+ export { DATA_SCOPES } from './scopes.js';
46
47
  export { SKILL_MANIFEST_VERSION, SKILL_CONTEXTS, SKILL_HISTORY_SCOPES, SKILL_MCP_MODES, SKILL_TRUST, SKILL_FILE_KINDS, SKILL_UPCASTERS, SkillManifestError, isSafeSkillPath, originOf, trustOf, skillFiles, needsBridge, declaredAccess, originLabel, sameSkillOrigin, skillIsStale, validateSkill, upcastSkill, upcastSkills, normalizeSkill } from './skill-manifest.js';
47
48
  export { SKILL_VARS, SKILL_VAR_NAMES, skillVar, skillVarPattern, parseSkillVars, lintSkillPrompt, suggestSkillVar, substituteSkillVars, skillVarGuidance, SkillVarError } from './skill-vars.js';
48
49
  export { outlineOf, parseListItem, continueList, indentSelection, toggleWrap, toggleLinePrefix, toggleTask, toggleLink, docStats, selectionStats } from './markdown-authoring.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/events",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "The canonical ChatPanel event-log and capability contracts \u2014 typed durable facts, clock-free deterministic linearization, schema upcasting, and the invariants the replay harness asserts. Pure, dependency-free ESM shared by the ChatPanel extension, gateway and bridge.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -24,6 +24,7 @@
24
24
  "./route-graph.js": "./route-graph.js",
25
25
  "./router.js": "./router.js",
26
26
  "./rules.js": "./rules.js",
27
+ "./scopes.js": "./scopes.js",
27
28
  "./search-engines.js": "./search-engines.js",
28
29
  "./skill-manifest.js": "./skill-manifest.js",
29
30
  "./skill-vars.js": "./skill-vars.js",
@@ -58,6 +59,7 @@
58
59
  "route-graph.js",
59
60
  "router.js",
60
61
  "rules.js",
62
+ "scopes.js",
61
63
  "search-engines.js",
62
64
  "skill-manifest.js",
63
65
  "skill-vars.js",
package/scopes.js ADDED
@@ -0,0 +1,12 @@
1
+ // scopes.js — the data-scope vocabulary, on its own so it can travel alone.
2
+ //
3
+ // One list names what anything in ChatPanel may touch. Capabilities declare `reads`
4
+ // and `writes` from it, sources declare `reads`, and a skill package declares `reads`
5
+ // — three declarations, one vocabulary, or "what may this reach" gets three answers.
6
+ //
7
+ // It is a separate module rather than a constant inside capability.js because the
8
+ // consumers have very different weights. The bridge vendors the skill contract and has
9
+ // zero runtime dependencies by design; pulling the capability machinery and the event
10
+ // schema behind it to reach a five-element array would be the transitive-graph mistake
11
+ // the extension's first-paint budget exists to prevent, one repo over.
12
+ export const DATA_SCOPES = Object.freeze(['notes', 'meetings', 'chats', 'page', 'files', 'net']);
package/skill-manifest.js CHANGED
@@ -25,7 +25,7 @@
25
25
  // default, and the upcast chain exists from the start so adding v3 does not mean
26
26
  // rewriting every reader.
27
27
 
28
- import { DATA_SCOPES } from './capability.js';
28
+ import { DATA_SCOPES } from './scopes.js';
29
29
 
30
30
  export class SkillManifestError extends Error {
31
31
  constructor(code, message) { super(message); this.name = 'SkillManifestError'; this.code = code; }