@subshell-ai/plugin-codex 0.0.1 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../plugin-api/dist/types-90lJTTx6.d.ts
1
+ //#region ../../plugin-api/dist/types-CzNsDcbd.d.ts
2
2
  //#region src/types.d.ts
3
3
  /**
4
4
  * The contract a Subshell plugin implements.
@@ -81,8 +81,8 @@ interface BuildCommandInput {
81
81
  * declares the `resume` capability. `mode: "start"` means the conversation
82
82
  * is NEW and must be created under exactly this id (pin it, because the host
83
83
  * stores it and later resumes by it); `mode: "resume"` names an EXISTING
84
- * conversation to continue (the host only asks after {@link HarnessResume.canResume}
85
- * confirmed it survives).
84
+ * conversation to continue (the host only asks after {@link HarnessResume.resumePath}
85
+ * pointed at a file the host found there).
86
86
  */
87
87
  harnessSession?: {
88
88
  id: string;
@@ -95,18 +95,31 @@ interface BuildCommandInput {
95
95
  *
96
96
  * The ids here are HARNESS conversation ids (a claude transcript uuid, say),
97
97
  * never subshell ids: the host pins {@link allocateHarnessSessionId} at launch,
98
- * stores it on the subshell row, and consults {@link canResume} before every
98
+ * stores it on the subshell row, and consults {@link resumePath} before every
99
99
  * restart to choose between continuing and starting fresh.
100
+ *
101
+ * Both members are PURE, and that is the load-bearing property (spec
102
+ * 2026-09-10 §5): a resume runs on the CONTROL PLANE, for a pane that lives on
103
+ * a machine the plane cannot see. Computing (rather than checking) is what
104
+ * lets one plugin implementation serve local and remote restarts identically.
100
105
  */
101
106
  interface HarnessResume {
102
107
  /** Allocates the HARNESS conversation id to pin at launch (a uuid for claude). */
103
108
  allocateHarnessSessionId(): string;
104
109
  /**
105
- * Whether the harness conversation `harnessSessionId` (last run in `cwd`)
106
- * still exists and can be resumed. False means the host launches a fresh
107
- * conversation rather than handing the harness an id it would reject.
110
+ * Where the resumable transcript would be, given the target machine's
111
+ * environment. PURE: it computes a path and never touches a filesystem, so
112
+ * the control plane can build it for a machine it cannot see. The HOST
113
+ * checks existence.
108
114
  */
109
- canResume(harnessSessionId: string, cwd: string): boolean;
115
+ resumePath(harnessSessionId: string, cwd: string, hostEnv: HostEnv): string;
116
+ }
117
+ /** The parts of a target machine's environment a plugin may compute against. */
118
+ interface HostEnv {
119
+ /** The node's home directory */
120
+ homeDir: string;
121
+ /** Values for the variables this plugin's manifest declared it needs */
122
+ env: Record<string, string>;
110
123
  }
111
124
  /** How to spawn the `subshell mcp` stdio server. */
112
125
  interface McpLaunchSpec {
@@ -299,6 +312,16 @@ interface SubshellManifest {
299
312
  detect?: DetectSpec;
300
313
  /** Install guidance shown when the binary is missing */
301
314
  install?: InstallSpec;
315
+ /**
316
+ * Environment variables this plugin computes against (spec 2026-09-10 §5).
317
+ *
318
+ * The node reports the VALUES of exactly these names at `ready`, so the
319
+ * reported set grows by declaration rather than a machine shipping its
320
+ * whole environment to the control plane. Declaring data is deliberate: a
321
+ * WRONG name is silent, yielding an absent key and the plugin's own
322
+ * fallback, i.e. a resume that quietly never offers itself (§11).
323
+ */
324
+ hostEnv?: string[];
302
325
  }
303
326
  //#endregion
304
327
  //#region src/manifest.d.ts
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../plugin-api/dist/manifest-im30YVIq.js
1
+ //#region ../../plugin-api/dist/manifest-UFScnYqn.js
2
2
  /** Every {@link PluginType}, for anything that has to iterate or validate them. */
3
3
  const PLUGIN_TYPES = ["agent-harness", "terminal"];
4
4
  /**
@@ -59,6 +59,11 @@ function parseManifest(pkgJson) {
59
59
  docsUrl: i.docsUrl
60
60
  };
61
61
  }
62
+ let hostEnv;
63
+ if (block.hostEnv !== void 0) {
64
+ if (!Array.isArray(block.hostEnv) || !block.hostEnv.every((k) => typeof k === "string" && k.trim() !== "")) return { error: "`subshell.hostEnv` must be an array of environment variable names" };
65
+ hostEnv = [...block.hostEnv];
66
+ }
62
67
  return {
63
68
  apiVersion: block.apiVersion,
64
69
  id: block.id,
@@ -68,7 +73,8 @@ function parseManifest(pkgJson) {
68
73
  ...typeof block.icon === "string" ? { icon: block.icon } : {},
69
74
  entry: block.entry,
70
75
  ...detect ? { detect } : {},
71
- ...install ? { install } : {}
76
+ ...install ? { install } : {},
77
+ ...hostEnv ? { hostEnv } : {}
72
78
  };
73
79
  }
74
80
  //#endregion
@@ -112,7 +118,7 @@ function validateGenericProfile(profile) {
112
118
  const parsed = parseManifest({
113
119
  name: "@subshell-ai/plugin-codex",
114
120
  description: "Codex harness plugin for Subshell",
115
- version: "0.0.1",
121
+ version: "0.1.0",
116
122
  license: "Apache-2.0",
117
123
  type: "module",
118
124
  main: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@subshell-ai/plugin-codex",
3
3
  "description": "Codex harness plugin for Subshell",
4
- "version": "0.0.1",
4
+ "version": "0.1.0",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",