@phyzess/pappra 0.1.0-beta.5 → 0.1.0-beta.7

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
@@ -63,7 +63,7 @@ requires an explicit controller. They are not needed for the core workflow above
63
63
  - **Knowledge:** workspace and private document catalogs with explicit preview/apply operations.
64
64
  - **Continuity:** private task checkpoints and bounded advisory resume packets. Resume never grants execution by itself.
65
65
  - **Code intelligence:** status, explicit preparation and bounded query for selected repositories. Text/structure fallback is available when the optional graph engine is absent.
66
- - **Host integrations:** optional Pi, Codex and Claude Code adapters that merge Pappra-owned entries without taking over user configuration. Hooks are copied as a dependency-free bundle into the host root; `host bundle --marketplace` exports a local marketplace that Claude Code and Codex accept, without registering it. `host install --mode plugin` fails closed until plugin registration and callability are verified in a real session.
66
+ - **Host integrations:** optional Pi, Codex and Claude Code adapters that merge Pappra-owned entries without taking over user configuration. Hooks are copied as a dependency-free bundle into the host root; `host bundle --marketplace` exports a local marketplace that Claude Code and Codex accept, without registering it. Plugin hooks are verified for Pi 1.3.0 and Claude Code 2.1.292 (startup) and unsupported for Codex 0.163.0; `host bundle` exports the bundle and `host install --mode plugin` fails closed with the per-host commands. See [host plugin validation](docs/host-plugin-validation.md).
67
67
  - **Bounded collaboration:** an optional, explicitly controlled one-request workflow. It is not a scheduler or daemon.
68
68
 
69
69
  ## Optional integrations and support
@@ -87,7 +87,7 @@ The check runs the source policy, type checks, formatting, deterministic tests a
87
87
 
88
88
  ## Status and limits
89
89
 
90
- Pappra is development software (`0.1.0-beta.5`) published as `@phyzess/pappra` under the `beta` dist-tag. Releases are published from GitHub Actions with npm trusted publishing (OIDC), so no npm token is stored in this repository. Pin either the moving `beta` tag or an exact version such as `@phyzess/pappra@0.1.0-beta.5`, because pre-release versions are never republished.
90
+ Pappra is development software (`0.1.0-beta.7`) published as `@phyzess/pappra` under the `beta` dist-tag. Releases are published from GitHub Actions with npm trusted publishing (OIDC), so no npm token is stored in this repository. Pin either the moving `beta` tag or an exact version such as `@phyzess/pappra@0.1.0-beta.7`, because pre-release versions are never republished.
91
91
 
92
92
  The deterministic suite covers synthetic workspaces, fixtures and local process boundaries. It does not establish real-model behavior, native host callability on every platform, CodeGraph completeness, Windows/Linux parity or production performance. A host adapter version pin is an observed support claim, not proof that a particular native installation will load or run correctly.
93
93
 
@@ -67,17 +67,20 @@ export async function exportHostPluginBundle(options) {
67
67
  for (const [path, bytes] of payload.contents) {
68
68
  // Plugin manifests point at hooks/hooks.json directly; the rendered
69
69
  // templates are only an intermediate artifact.
70
- if (options.host !== 'pi' && path.startsWith('templates/'))
70
+ if (path.startsWith('templates/'))
71
71
  continue;
72
72
  await writeEntry(`${pluginPrefix}${path}`, bytes);
73
73
  }
74
74
  const expression = pluginHookExpression(options.host);
75
75
  if (options.host === 'pi') {
76
76
  const entry = payload.contents.get('templates/pi/entry.ts');
77
- if (entry === undefined) {
77
+ const runtime = payload.contents.get('templates/pi/runtime.mjs');
78
+ if (entry === undefined || runtime === undefined) {
78
79
  throw new Error('Pi plugin bundle is missing its extension entry.');
79
80
  }
81
+ // The generated entry imports ./runtime.mjs, so both files share one directory.
80
82
  await writeEntry(`${pluginPrefix}extensions/pappra/index.ts`, entry);
83
+ await writeEntry(`${pluginPrefix}extensions/pappra/runtime.mjs`, runtime);
81
84
  }
82
85
  else {
83
86
  const patch = renderHookConfigPatch(options.host, expression);
@@ -12,7 +12,7 @@ import { getPackageInfo } from '../../package-info.js';
12
12
  import { detectPassiveHosts } from '../detect.js';
13
13
  import { installPathForBundleFile, loadHostBundle } from './bundle.js';
14
14
  import { hostConfigRelativePath, renderHookConfigPatch } from './templates.js';
15
- import { HOST_SUPPORT, isSupportedVersion, nativeEventFor, surfaceFor, } from './support.js';
15
+ import { HOST_PLUGIN_HOOKS, HOST_SUPPORT, isSupportedVersion, nativeEventFor, surfaceFor, } from './support.js';
16
16
  const LIFECYCLE_EVENTS = [
17
17
  'startup',
18
18
  'resume',
@@ -885,6 +885,14 @@ export class HostIntegrationService {
885
885
  }
886
886
  async install(host, options) {
887
887
  if (options.mode === 'plugin') {
888
+ const support = HOST_PLUGIN_HOOKS[host];
889
+ const guidance = host === 'claude' && support.state === 'verified'
890
+ ? 'Export with `pappra host bundle --host claude --out <dir> --marketplace --json`, then run `claude plugin marketplace add <dir>` and `claude plugin install pappra@pappra-local`. Use --mode project-settings for automatic workspace wiring.'
891
+ : host === 'pi' && support.state === 'verified'
892
+ ? 'Export with `pappra host bundle --host pi --out <dir> --json`, then run `pi install <dir> -l -a`. Use --mode project-settings for automatic workspace wiring.'
893
+ : support.state === 'unsupported'
894
+ ? 'This host does not load plugin hooks at its pinned version; keep --mode project-settings. See docs/host-plugin-validation.md.'
895
+ : 'Plugin hooks are not verified for this host yet; an authenticated lifecycle session is required. Use --mode project-settings meanwhile.';
888
896
  return hostIntegrationResultSchema.parse({
889
897
  schema: 'pappra/host-integration/1',
890
898
  ok: false,
@@ -893,7 +901,7 @@ export class HostIntegrationService {
893
901
  appliedFiles: [],
894
902
  residualPaths: [],
895
903
  diagnostics: [
896
- diagnostic(diagnosticCodes.host_unavailable, 'Plugin install mode is not wired: host registration, trust and callability are unverified.', this.#root, 'Use `pappra host bundle --host <name> --out <dir>` to export the plugin directory and register it yourself; project-settings install remains the verified mode.'),
904
+ diagnostic(diagnosticCodes.host_unavailable, `Plugin install mode is not wired for ${host}: ${support.state}. ${support.evidence}`, this.#root, guidance),
897
905
  ],
898
906
  });
899
907
  }
@@ -34,3 +34,23 @@ export declare const HOST_SUPPORT: {
34
34
  export declare function nativeEventFor(host: HostName, event: HostLifecycleEvent): string | null;
35
35
  export declare function isSupportedVersion(host: HostName, version: string | null): boolean;
36
36
  export declare function surfaceFor(host: HostName): (typeof HOST_SUPPORT)[HostName]['surface'];
37
+ /**
38
+ * Observed plugin-hook support. `verified` means a real host session produced a
39
+ * `.pappra/local/host-events/<host>` record; `unsupported` means a control hook
40
+ * fired while the bundled plugin hook did not; `unverified` means no
41
+ * authenticated session was available. See docs/host-plugin-validation.md.
42
+ */
43
+ export declare const HOST_PLUGIN_HOOKS: {
44
+ readonly pi: {
45
+ readonly state: 'verified';
46
+ readonly evidence: 'Pi 1.3.0 fires the packaged extension: `pi install <dir> -l -a` plus `pi -p -a` wrote a session_start event.';
47
+ };
48
+ readonly codex: {
49
+ readonly state: 'unsupported';
50
+ readonly evidence: 'Codex 0.163.0 does not load plugin hooks: a control hook in CODEX_HOME fired during `codex exec --dangerously-bypass-hook-trust` while the bundled plugin hook never ran, including with a .codex-plugin/plugin.json copy.';
51
+ };
52
+ readonly claude: {
53
+ readonly state: 'verified';
54
+ readonly evidence: 'Claude Code 2.1.292 passed `claude plugin validate`, then a project-scope marketplace install and `claude -p` wrote a SessionStart event from ${CLAUDE_PLUGIN_ROOT}/hooks/pappra-hook.mjs.';
55
+ };
56
+ };
@@ -39,3 +39,23 @@ export function isSupportedVersion(host, version) {
39
39
  export function surfaceFor(host) {
40
40
  return HOST_SUPPORT[host].surface;
41
41
  }
42
+ /**
43
+ * Observed plugin-hook support. `verified` means a real host session produced a
44
+ * `.pappra/local/host-events/<host>` record; `unsupported` means a control hook
45
+ * fired while the bundled plugin hook did not; `unverified` means no
46
+ * authenticated session was available. See docs/host-plugin-validation.md.
47
+ */
48
+ export const HOST_PLUGIN_HOOKS = {
49
+ pi: {
50
+ state: 'verified',
51
+ evidence: 'Pi 1.3.0 fires the packaged extension: `pi install <dir> -l -a` plus `pi -p -a` wrote a session_start event.',
52
+ },
53
+ codex: {
54
+ state: 'unsupported',
55
+ evidence: 'Codex 0.163.0 does not load plugin hooks: a control hook in CODEX_HOME fired during `codex exec --dangerously-bypass-hook-trust` while the bundled plugin hook never ran, including with a .codex-plugin/plugin.json copy.',
56
+ },
57
+ claude: {
58
+ state: 'verified',
59
+ evidence: 'Claude Code 2.1.292 passed `claude plugin validate`, then a project-scope marketplace install and `claude -p` wrote a SessionStart event from ${CLAUDE_PLUGIN_ROOT}/hooks/pappra-hook.mjs.',
60
+ },
61
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phyzess/pappra",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.7",
4
4
  "description": "Portable workspace knowledge and continuity for coding agents.",
5
5
  "publishConfig": {
6
6
  "access": "public"