principles-disciple 1.197.8 → 1.197.10

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/bundle.js CHANGED
@@ -2752,9 +2752,9 @@ ${a.join(`
2752
2752
  `);let r=this.db.prepare("SELECT version FROM schema_version LIMIT 1").get()?.version??0;r===0?this.db.prepare("INSERT INTO schema_version (version) VALUES (?)").run(mb):r<mb&&(this.runMigrations(r,mb),this.db.prepare("UPDATE schema_version SET version = ?").run(mb))}runMigrations(t,r){if(t<2&&r>=2)try{this.db.exec("ALTER TABLE subagent_workflows ADD COLUMN duration_ms INTEGER"),console.info(`[PD:WorkflowStore] Schema migration v${t} \u2192 v${r}: added duration_ms column`)}catch(o){let n=o instanceof Error?o.message:String(o);n.includes("duplicate column name")||console.info(`[PD:WorkflowStore] Schema migration v${t} \u2192 v${r} failed: ${n}`)}}createWorkflow(t){this.db.prepare(`
2753
2753
  INSERT INTO subagent_workflows (
2754
2754
  workflow_id, workflow_type, transport, parent_session_id, child_session_key,
2755
- run_id, state, cleanup_state, created_at, updated_at, last_observed_at, metadata_json
2756
- ) VALUES (?, ?, ?, ?, ?, ?, ?, 'none', ?, ?, NULL, ?)
2757
- `).run(t.workflow_id,t.workflow_type,t.transport,t.parent_session_id,t.child_session_key,t.run_id,t.state,t.created_at,t.updated_at,t.metadata_json)}updateWorkflowState(t,r,o){let n=Date.now(),i=this.getWorkflow(t);i&&(this.db.prepare(`
2755
+ run_id, state, cleanup_state, created_at, updated_at, last_observed_at, duration_ms, metadata_json
2756
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, 'none', ?, ?, ?, ?, ?)
2757
+ `).run(t.workflow_id,t.workflow_type,t.transport,t.parent_session_id,t.child_session_key,t.run_id,t.state,t.created_at,t.updated_at,t.last_observed_at??null,t.duration_ms??null,t.metadata_json)}updateWorkflowState(t,r,o){let n=Date.now(),i=this.getWorkflow(t);i&&(this.db.prepare(`
2758
2758
  UPDATE subagent_workflows SET state = ?, updated_at = ?, last_observed_at = ? WHERE workflow_id = ?
2759
2759
  `).run(r,n,n,t),o&&this.recordEvent(t,"state_change",i.state,r,o,{}))}updateWorkflowRunId(t,r){let o=Date.now();this.db.prepare(`
2760
2760
  UPDATE subagent_workflows SET run_id = ?, updated_at = ? WHERE workflow_id = ?
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
5
- "version": "1.197.8",
5
+ "version": "1.197.10",
6
6
  "activation": {
7
7
  "onCapabilities": [
8
8
  "hook"
@@ -2,7 +2,7 @@
2
2
  "id": "principles-disciple",
3
3
  "name": "Principles Disciple",
4
4
  "description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
5
- "version": "1.197.8",
5
+ "version": "1.197.10",
6
6
  "activation": {
7
7
  "onCapabilities": [
8
8
  "hook"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "principles-disciple",
3
- "version": "1.197.8",
3
+ "version": "1.197.10",
4
4
  "description": "Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles. Stop correcting the same AI behavior across sessions.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -58,7 +58,11 @@ async function run() {
58
58
  console.log(` Validation: ${valid ? 'PASS' : 'FAIL'}`);
59
59
  }
60
60
  } catch (err) {
61
- console.error(`\nBootstrap failed: ${err.message}`);
61
+ if (err && typeof err === 'object' && 'code' in err && err.code === 'NO_DETERMINISTIC_PRINCIPLES') {
62
+ console.log('\nNothing to bootstrap yet; the workspace has no deterministic principles.');
63
+ return;
64
+ }
65
+ console.error(`\nBootstrap failed: ${err instanceof Error ? err.message : String(err)}`);
62
66
  process.exit(1);
63
67
  }
64
68
  }
@@ -1400,6 +1400,7 @@ function main() {
1400
1400
  if (args.restart) {
1401
1401
  const restarted = restartGateway();
1402
1402
  if (!restarted) {
1403
+ process.exitCode = 1;
1403
1404
  console.warn('\n⚠️ Plugin files installed but gateway restart was not confirmed.');
1404
1405
  console.warn(' The gateway may already be running. Verify with:');
1405
1406
  console.warn(' PowerShell: openclaw gateway status');
@@ -1411,6 +1412,7 @@ function main() {
1411
1412
  console.warn(' Then: openclaw gateway start');
1412
1413
  console.warn('');
1413
1414
  console.warn(' Or simply restart from PowerShell (not affected by the cygpath bug).');
1415
+ console.error('\nINSTALLATION INCOMPLETE: plugin files were copied, but the running product was not verified.');
1414
1416
  }
1415
1417
  } else {
1416
1418
  console.log('\n💡 Restart OpenClaw Gateway to load the new version.');