kiokuko-dsh 0.2.6 → 0.2.8
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.ja.md +3 -1
- package/README.ko.md +4 -0
- package/README.md +3 -1
- package/README.zh-CN.md +4 -0
- package/dist/dsh/agenticreplay-libraries.d.ts +1 -0
- package/dist/dsh/agenticreplay-libraries.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-libraries.js.map +1 -1
- package/dist/dsh/agenticreplay-read-service.d.ts +6 -0
- package/dist/dsh/agenticreplay-read-service.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-read-service.js +10 -0
- package/dist/dsh/agenticreplay-read-service.js.map +1 -1
- package/dist/dsh/agenticreplay-recorder.d.ts +19 -12
- package/dist/dsh/agenticreplay-recorder.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-recorder.js +41 -12
- package/dist/dsh/agenticreplay-recorder.js.map +1 -1
- package/dist/dsh/agenticreplay-security.d.ts +3 -0
- package/dist/dsh/agenticreplay-security.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-security.js +144 -7
- package/dist/dsh/agenticreplay-security.js.map +1 -1
- package/dist/dsh/agenticreplay-status-presentation.d.ts.map +1 -1
- package/dist/dsh/agenticreplay-status-presentation.js +3 -1
- package/dist/dsh/agenticreplay-status-presentation.js.map +1 -1
- package/dist/dsh/coding-workflow/intent.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/intent.js +7 -2
- package/dist/dsh/coding-workflow/intent.js.map +1 -1
- package/dist/dsh/coding-workflow/store.d.ts +22 -0
- package/dist/dsh/coding-workflow/store.d.ts.map +1 -1
- package/dist/dsh/coding-workflow/store.js +51 -0
- package/dist/dsh/coding-workflow/store.js.map +1 -1
- package/dist/dsh/core/host.d.ts.map +1 -1
- package/dist/dsh/core/host.js +8 -1
- package/dist/dsh/core/host.js.map +1 -1
- package/dist/dsh/decisions/request-intent.d.ts +14 -1
- package/dist/dsh/decisions/request-intent.d.ts.map +1 -1
- package/dist/dsh/decisions/request-intent.js +28 -6
- package/dist/dsh/decisions/request-intent.js.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.d.ts +1 -0
- package/dist/dsh/host-adapter/lifecycle.d.ts.map +1 -1
- package/dist/dsh/host-adapter/lifecycle.js +18 -2
- package/dist/dsh/host-adapter/lifecycle.js.map +1 -1
- package/dist/dsh/host-adapter.d.ts.map +1 -1
- package/dist/dsh/host-adapter.js +10 -0
- package/dist/dsh/host-adapter.js.map +1 -1
- package/dist/dsh/index.d.ts +2 -0
- package/dist/dsh/index.d.ts.map +1 -1
- package/dist/dsh/index.js +2 -0
- package/dist/dsh/index.js.map +1 -1
- package/dist/dsh/lifecycle-memory.d.ts +65 -0
- package/dist/dsh/lifecycle-memory.d.ts.map +1 -0
- package/dist/dsh/lifecycle-memory.js +502 -0
- package/dist/dsh/lifecycle-memory.js.map +1 -0
- package/dist/dsh/models/vendor/opencode-codec.d.ts.map +1 -1
- package/dist/dsh/models/vendor/opencode-codec.js +71 -0
- package/dist/dsh/models/vendor/opencode-codec.js.map +1 -1
- package/dist/dsh/node-tap-summary.d.ts +1 -2
- package/dist/dsh/node-tap-summary.d.ts.map +1 -1
- package/dist/dsh/node-tap-summary.js +2 -24
- package/dist/dsh/node-tap-summary.js.map +1 -1
- package/dist/dsh/observation-pack/policy.d.ts +1 -0
- package/dist/dsh/observation-pack/policy.d.ts.map +1 -1
- package/dist/dsh/observation-pack/policy.js +3 -0
- package/dist/dsh/observation-pack/policy.js.map +1 -1
- package/dist/dsh/observation-pack/service.d.ts.map +1 -1
- package/dist/dsh/observation-pack/service.js +3 -1
- package/dist/dsh/observation-pack/service.js.map +1 -1
- package/dist/dsh/on-demand-intake.d.ts +5 -0
- package/dist/dsh/on-demand-intake.d.ts.map +1 -1
- package/dist/dsh/skill-prompts.json +1 -1
- package/dist/index.js +2 -0
- package/dist/locale/en.json +1 -1
- package/dist/locale/ja.json +1 -1
- package/dist/locale/ko.json +1 -1
- package/dist/locale/zh-CN.json +1 -1
- package/dist/memory/application.js +1 -1
- package/dist/memory/application.js.map +1 -1
- package/dist/memory/hybrid-retrieval.d.ts.map +1 -1
- package/dist/memory/hybrid-retrieval.js +3 -0
- package/dist/memory/hybrid-retrieval.js.map +1 -1
- package/dist/memory/lifecycle-cache.d.ts +12 -0
- package/dist/memory/lifecycle-cache.d.ts.map +1 -0
- package/dist/memory/lifecycle-cache.js +36 -0
- package/dist/memory/lifecycle-cache.js.map +1 -0
- package/dist/memory/lifecycle-database.d.ts +5 -0
- package/dist/memory/lifecycle-database.d.ts.map +1 -0
- package/dist/memory/lifecycle-database.js +32 -0
- package/dist/memory/lifecycle-database.js.map +1 -0
- package/dist/memory/lifecycle-global-state.d.ts +5 -0
- package/dist/memory/lifecycle-global-state.d.ts.map +1 -0
- package/dist/memory/lifecycle-global-state.js +23 -0
- package/dist/memory/lifecycle-global-state.js.map +1 -0
- package/dist/memory/lifecycle-global.d.ts +23 -0
- package/dist/memory/lifecycle-global.d.ts.map +1 -0
- package/dist/memory/lifecycle-global.js +56 -0
- package/dist/memory/lifecycle-global.js.map +1 -0
- package/dist/memory/lifecycle.d.ts +152 -0
- package/dist/memory/lifecycle.d.ts.map +1 -0
- package/dist/memory/lifecycle.js +227 -0
- package/dist/memory/lifecycle.js.map +1 -0
- package/dist/model-tools/contracts.d.ts +2 -2
- package/docs/agenticreplay-recording.md +1 -1
- package/docs/lifecycle-memory.md +25 -0
- package/docs/owned-execution.md +3 -3
- package/docs/semantic-compaction.md +2 -0
- package/docs/verification.md +112 -0
- package/migrations/038_coding_admission.sql +19 -0
- package/migrations/039_memory_lifecycle.sql +336 -0
- package/package.json +7 -3
- package/scripts/evaluate-answer-review.mjs +3 -0
- package/scripts/verification-completion.mjs +12 -0
- package/scripts/verify-lisp-vendor.mjs +3 -0
- package/skills/coding-ideal-routine-skill/SKILL.md +12 -0
- package/skills/one-shot-software-completion/SKILL.md +13 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Repository verification
|
|
2
|
+
|
|
3
|
+
Goal: CI executes the same repository-owned verification contract as local development.
|
|
4
|
+
`npm run verify` runs the full applicable scope. `npm run verify -- --profile main`
|
|
5
|
+
and other profiles are explicitly partial. `npm test` remains a fast/focused entry.
|
|
6
|
+
|
|
7
|
+
Inspect `npm run verify:plan` before running. Each check declares its runner,
|
|
8
|
+
dependencies, required capability and required result in `scripts/verification.json`.
|
|
9
|
+
CI prepares environments, selects profiles and retains output. Missing required
|
|
10
|
+
capabilities are `prerequisite-missing`; unexpected skips, empty Node suites and
|
|
11
|
+
failed assertions are non-success. Platform exclusions are declared before execution
|
|
12
|
+
and recorded with a reason. Exclusions never imply a result on that platform.
|
|
13
|
+
|
|
14
|
+
Output defaults to a fresh OS temporary directory. Supply an empty directory
|
|
15
|
+
outside the repository with `--output`. `plan.json`, per-command logs, official
|
|
16
|
+
Node lifecycle reports, `progress.json`, `result.json` and the candidate archive
|
|
17
|
+
are retained. Reports identify source content, runtime, profile, contract and archive.
|
|
18
|
+
|
|
19
|
+
All package consumers run after a final clean build and pack, against the same
|
|
20
|
+
archive and hash. Installed smoke/host assertions remain the existing assertions.
|
|
21
|
+
The DSH core pack and Skill consumers use normal minimal installs, with no links
|
|
22
|
+
to the development node_modules. Changes during verification are `stale`; saved
|
|
23
|
+
results must be rechecked using `npm run verify -- --status <result.json>`.
|
|
24
|
+
A profile passing alone never sets `completionReady`. A stale or failed full run
|
|
25
|
+
must not be reported as full verification, and local results do not prove remote CI.
|
|
26
|
+
|
|
27
|
+
## Common suites and retained assertions
|
|
28
|
+
|
|
29
|
+
The inventory below is generated from the repository contract. A script check
|
|
30
|
+
requires a fresh check-bound completion receipt after its existing assertions;
|
|
31
|
+
arbitrary stdout or a successful no-op process is insufficient.
|
|
32
|
+
|
|
33
|
+
| Common check | Profiles | Runner | Required result |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| verification-contract | main, semantic, lisp, browser, runtime | `node --test scripts/verification-contract.test.mjs` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
36
|
+
| typecheck | main | `npm run typecheck` | exit 0 |
|
|
37
|
+
| build | main, semantic, lisp, browser, runtime, code-provider, p0, packages-live | `npm run build` | exit 0 |
|
|
38
|
+
| native-unit | main | `node scripts/run-ci-native.mjs unit` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
39
|
+
| native-integration | main | `node scripts/run-ci-native.mjs integration` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
40
|
+
| native-e2e | main | `node scripts/run-ci-native.mjs e2e` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
41
|
+
| skill-efficiency | main | `npm run test:skill-efficiency` | explicit completion receipt |
|
|
42
|
+
| coding-offline | main | `node --test tests/fixtures/skill-coding/offline.test.mjs` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
43
|
+
| harness | main | `npm run test:harness` | explicit completion receipt |
|
|
44
|
+
| retrieval | main | `npm run test:evaluation` | explicit completion receipt |
|
|
45
|
+
| decision-evaluation | main | `npm run test:evaluation:decisions` | explicit completion receipt |
|
|
46
|
+
| intent-evaluation | main | `npm run test:evaluation:request-intent` | explicit completion receipt |
|
|
47
|
+
| answer-evaluation | main | `npm run test:evaluation:answer-review` | explicit completion receipt |
|
|
48
|
+
| memory-reuse-evaluation | main | `npm run test:evaluation:memory-reuse -- --mode=all` | explicit completion receipt |
|
|
49
|
+
| sampledb | main | `npm run test:sampledb` | explicit completion receipt |
|
|
50
|
+
| publint | main | `npm run publint` | exit 0 |
|
|
51
|
+
| prepare-reproducibility | main | `npm run verify:prepare` | explicit completion receipt |
|
|
52
|
+
| native-search | lisp, runtime | `node scripts/run-tests.mjs tests/dsh/integration/native-search.test.ts` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
53
|
+
| laya-worker | lisp | `npm run test:laya-worker` | exit 0 |
|
|
54
|
+
| lisp-vendor | lisp | `npm run verify:lisp:vendor` | explicit completion receipt |
|
|
55
|
+
| lisp-native | lisp | `npm run test:ci:lisp` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
56
|
+
| owned-native | lisp | `node scripts/run-tests.mjs tests/dsh/integration/owned-execution.test.ts tests/dsh/integration/owned-native-lifecycle.test.ts` | complete official lifecycle; at least one passing leaf; no failures, cancellation, todo or undeclared skips |
|
|
57
|
+
| modules | lisp | `npm run test:modules` | explicit completion receipt |
|
|
58
|
+
| models-web | browser | `node scripts/verify-models-web.mjs` | explicit completion receipt |
|
|
59
|
+
| coding-web | browser | `node scripts/verify-coding-workflow-web.mjs` | explicit completion receipt |
|
|
60
|
+
| shortcuts-web | browser | `node scripts/verify-shortcuts-web.mjs` | explicit completion receipt |
|
|
61
|
+
| lisp-approval-web | browser | `node scripts/verify-lisp-approval-web.mjs` | explicit completion receipt |
|
|
62
|
+
| lisp-plan-web | browser | `node scripts/verify-lisp-plan-web.mjs` | explicit completion receipt |
|
|
63
|
+
| pack-check | main, lisp | `node scripts/pack-check.mjs` | explicit completion receipt |
|
|
64
|
+
| skill-delivery | main, lisp | `node scripts/run-skill-delivery.mjs` | explicit completion receipt |
|
|
65
|
+
| consumer-npm | main, runtime | `node scripts/verify-agenticreplay-consumer.mjs` | explicit completion receipt |
|
|
66
|
+
| consumer-pnpm | main, runtime | `node scripts/verify-agenticreplay-consumer.mjs --pnpm` | explicit completion receipt |
|
|
67
|
+
| dsh-lifecycle | main, runtime | `node scripts/run-enno-dsh-e2e.mjs` | explicit completion receipt |
|
|
68
|
+
| sqlite-vec | main, semantic | `npm run test:sqlite-vec` | explicit completion receipt |
|
|
69
|
+
| code-provider | code-provider | `node scripts/run-ci-native.mjs code-provider` | Explicit selected native fixture; nonempty official lifecycle without skipped required cases. |
|
|
70
|
+
| p0 | p0 | `node scripts/run-ci-native.mjs p0` | Explicit selected native fixture; nonempty official lifecycle without skipped required cases. |
|
|
71
|
+
| packages-live | packages-live | `node scripts/run-ci-native.mjs packages-live` | Explicit selected native fixture; nonempty official lifecycle without skipped required cases. |
|
|
72
|
+
|
|
73
|
+
## Consolidated duplicate invocations
|
|
74
|
+
|
|
75
|
+
- `skill-prompts` is covered by `native-unit`: `tests/dsh/unit/skill-compiler.test.ts`, `tests/dsh/unit/skill-snapshot.test.ts`.
|
|
76
|
+
- `index-reasoning` is covered by `native-integration`: `tests/dsh/integration/index-reasoning.test.ts`, `tests/dsh/integration/index-reasoning-native.test.ts`, `tests/dsh/integration/index-reasoning-evaluation.test.ts`.
|
|
77
|
+
- `index-evaluation` is covered by `native-integration`: `tests/dsh/integration/index-reasoning-evaluation.test.ts`.
|
|
78
|
+
|
|
79
|
+
Import-only convenience entrypoints remain usable explicitly. Recursive discovery
|
|
80
|
+
excludes these aliases and executes each declared leaf exactly once:
|
|
81
|
+
|
|
82
|
+
- `tests/dsh/integration/capability.test.ts`: `tests/dsh/integration/akinator-gate.test.ts`, `tests/dsh/integration/pre-step/gate.test.ts`, `tests/dsh/unit/capability-catalog.test.ts`.
|
|
83
|
+
- `tests/dsh/integration/close-resume.test.ts`: `tests/dsh/integration/run-close.test.ts`, `tests/dsh/integration/run-resume.test.ts`, `tests/dsh/integration/run-resume/exact-route.test.ts`.
|
|
84
|
+
- `tests/dsh/integration/enno-turn-stopping.test.ts`: `tests/dsh/integration/turn-stopping-gate.test.ts`, `tests/dsh/integration/enno-role-loop.test.ts`.
|
|
85
|
+
- `tests/dsh/integration/provider.test.ts`: `tests/dsh/integration/skill-provider.test.ts`.
|
|
86
|
+
|
|
87
|
+
## Explicit optional lanes
|
|
88
|
+
|
|
89
|
+
These files are excluded before ordinary discovery and recorded as scope-excluded
|
|
90
|
+
in the full plan. Selecting the named profile makes its fixture and assertions required.
|
|
91
|
+
|
|
92
|
+
- `code-provider`: `tests/dsh/integration/lisp/code-intelligence-native.test.ts`. This optional V1 provider requires an explicit built provider fixture.
|
|
93
|
+
- `p0`: `tests/dsh/integration/lisp/p0-seatbelt.test.ts`. This experimental macOS P0 candidate is an explicit probe, not production protection evidence.
|
|
94
|
+
- `packages-live`: `tests/dsh/integration/lisp/packages-live.test.ts`. Live public package registries are an explicitly selected integration lane.
|
|
95
|
+
|
|
96
|
+
## Removed no-op checks
|
|
97
|
+
|
|
98
|
+
- `embedding`: The old --offline invocation read no model manifest; DSH ships no preset manifest. Explicit --model-dir checksum/inference remains available.
|
|
99
|
+
|
|
100
|
+
The five browser consumers receive the same final tarball as CLI, npm and pnpm
|
|
101
|
+
consumers. Their standalone npm commands remain available; formal verification
|
|
102
|
+
executes the existing assertion scripts directly after its own clean build.
|
|
103
|
+
|
|
104
|
+
The old CI YAML substring test is retired: the common runner probes required
|
|
105
|
+
runtime capabilities and rejects missing prerequisites in the real execution path.
|
|
106
|
+
The fixture-version, suite-discovery and alias/optional-lane contracts remain tested.
|
|
107
|
+
|
|
108
|
+
`pre-step.test.ts` is also an import-only alias for `pre-step/gate.test.ts`.
|
|
109
|
+
Native Lisp integration requires `protected-python3`: a real sandbox subprocess
|
|
110
|
+
probe. An Apple launcher that only reports its version outside the sandbox does
|
|
111
|
+
not satisfy this capability. Local/CI environment preparation must select a real
|
|
112
|
+
installed Python interpreter; the repository never changes the global PATH.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- Admission intent is run-bound. Existing runs remain on the explicit legacy
|
|
2
|
+
-- path; every run created after this migration must write its own admission.
|
|
3
|
+
CREATE TABLE dsh_coding_admissions (
|
|
4
|
+
run_id TEXT PRIMARY KEY REFERENCES ledger_runs(run_id) ON DELETE CASCADE,
|
|
5
|
+
request_id TEXT,
|
|
6
|
+
request_digest TEXT,
|
|
7
|
+
admission_version TEXT NOT NULL,
|
|
8
|
+
intent_policy_version TEXT NOT NULL,
|
|
9
|
+
change_scope TEXT NOT NULL CHECK(change_scope IN ('implementation','document','unknown')),
|
|
10
|
+
confirmation_required INTEGER NOT NULL CHECK(confirmation_required IN (0,1)),
|
|
11
|
+
legacy INTEGER NOT NULL CHECK(legacy IN (0,1)),
|
|
12
|
+
created_at TEXT NOT NULL,
|
|
13
|
+
CHECK((legacy=1 AND admission_version='legacy' AND confirmation_required=0)
|
|
14
|
+
OR (legacy=0 AND request_id IS NOT NULL AND request_digest IS NOT NULL
|
|
15
|
+
AND admission_version='lisp-choice-admission-v1'))
|
|
16
|
+
);
|
|
17
|
+
INSERT INTO dsh_coding_admissions
|
|
18
|
+
(run_id,request_id,request_digest,admission_version,intent_policy_version,change_scope,confirmation_required,legacy,created_at)
|
|
19
|
+
SELECT run_id,NULL,NULL,'legacy','legacy','unknown',0,1,created_at FROM ledger_runs;
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
CREATE TABLE dsh_memory_observations (
|
|
2
|
+
workspace TEXT NOT NULL,
|
|
3
|
+
producer TEXT NOT NULL,
|
|
4
|
+
event_id TEXT NOT NULL,
|
|
5
|
+
session_id TEXT NOT NULL,
|
|
6
|
+
source_key TEXT NOT NULL,
|
|
7
|
+
source_revision INTEGER NOT NULL CHECK(source_revision >= 0),
|
|
8
|
+
tombstone INTEGER NOT NULL CHECK(tombstone IN (0,1)),
|
|
9
|
+
host_verified INTEGER NOT NULL CHECK(host_verified IN (0,1)),
|
|
10
|
+
observation_json TEXT NOT NULL,
|
|
11
|
+
content_hash TEXT NOT NULL,
|
|
12
|
+
created_at TEXT NOT NULL,
|
|
13
|
+
PRIMARY KEY(workspace,producer,event_id,source_revision),
|
|
14
|
+
UNIQUE(workspace,producer,source_key,source_revision)
|
|
15
|
+
);
|
|
16
|
+
CREATE INDEX dsh_memory_observation_sources ON dsh_memory_observations(workspace,producer,source_key,source_revision DESC);
|
|
17
|
+
CREATE INDEX dsh_memory_observation_sessions ON dsh_memory_observations(workspace,session_id,created_at DESC);
|
|
18
|
+
CREATE TABLE dsh_memory_routine_revisions (
|
|
19
|
+
workspace TEXT NOT NULL,
|
|
20
|
+
candidate_id TEXT NOT NULL,
|
|
21
|
+
revision INTEGER NOT NULL CHECK(revision > 0),
|
|
22
|
+
candidate_json TEXT NOT NULL,
|
|
23
|
+
content_hash TEXT NOT NULL,
|
|
24
|
+
created_at TEXT NOT NULL,
|
|
25
|
+
PRIMARY KEY(workspace,candidate_id,revision)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
CREATE INDEX dsh_memory_observation_recent ON dsh_memory_observations(workspace,created_at DESC,event_id DESC);
|
|
29
|
+
CREATE INDEX dsh_memory_routine_recent ON dsh_memory_routine_revisions(workspace,created_at DESC);
|
|
30
|
+
CREATE TABLE dsh_memory_principle_sources (
|
|
31
|
+
workspace TEXT NOT NULL,
|
|
32
|
+
candidate_id TEXT NOT NULL,
|
|
33
|
+
entry_id TEXT NOT NULL UNIQUE REFERENCES entries(id),
|
|
34
|
+
candidate_hash TEXT NOT NULL,
|
|
35
|
+
sources_json TEXT NOT NULL,
|
|
36
|
+
active INTEGER NOT NULL CHECK(active IN (0,1)),
|
|
37
|
+
PRIMARY KEY(workspace,candidate_id)
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
-- Domain revisions exclude ledger/recorder/audit traffic on the same database.
|
|
41
|
+
CREATE TABLE dsh_memory_processing_state (
|
|
42
|
+
workspace TEXT PRIMARY KEY,
|
|
43
|
+
source_revision INTEGER NOT NULL DEFAULT 0,
|
|
44
|
+
context_revision INTEGER NOT NULL DEFAULT 0,
|
|
45
|
+
processed_revision INTEGER NOT NULL DEFAULT -1,
|
|
46
|
+
processed_limit INTEGER NOT NULL DEFAULT 0
|
|
47
|
+
);
|
|
48
|
+
-- Terminal source eligibility may change on a real resume; sequence/audit
|
|
49
|
+
-- updates alone must leave cached context untouched.
|
|
50
|
+
CREATE TRIGGER lifecycle_reference_run_status AFTER UPDATE OF status,workspace ON ledger_runs
|
|
51
|
+
WHEN OLD.status IS NOT NEW.status OR OLD.workspace IS NOT NEW.workspace BEGIN
|
|
52
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
53
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
54
|
+
END;
|
|
55
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_observations_insert AFTER INSERT ON dsh_memory_observations BEGIN
|
|
56
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,1,1)
|
|
57
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
58
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
59
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
60
|
+
END;
|
|
61
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_observations_update AFTER UPDATE ON dsh_memory_observations BEGIN
|
|
62
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,1,1)
|
|
63
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
64
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
65
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
66
|
+
END;
|
|
67
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_observations_delete AFTER DELETE ON dsh_memory_observations BEGIN
|
|
68
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(OLD.workspace,1,1)
|
|
69
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
70
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE OLD.workspace<>'global'
|
|
71
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
72
|
+
END;
|
|
73
|
+
CREATE TRIGGER lifecycle_version_memory_capture_exclusions_insert AFTER INSERT ON memory_capture_exclusions BEGIN
|
|
74
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,1,1)
|
|
75
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
76
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
77
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
78
|
+
END;
|
|
79
|
+
CREATE TRIGGER lifecycle_version_memory_capture_exclusions_update AFTER UPDATE ON memory_capture_exclusions BEGIN
|
|
80
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,1,1)
|
|
81
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
82
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
83
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
84
|
+
END;
|
|
85
|
+
CREATE TRIGGER lifecycle_version_memory_capture_exclusions_delete AFTER DELETE ON memory_capture_exclusions BEGIN
|
|
86
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(OLD.workspace,1,1)
|
|
87
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+1,context_revision=context_revision+1;
|
|
88
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE OLD.workspace<>'global'
|
|
89
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
90
|
+
END;
|
|
91
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_routine_revisions_insert AFTER INSERT ON dsh_memory_routine_revisions BEGIN
|
|
92
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,0,1)
|
|
93
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+0,context_revision=context_revision+1;
|
|
94
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
95
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
96
|
+
END;
|
|
97
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_routine_revisions_update AFTER UPDATE ON dsh_memory_routine_revisions BEGIN
|
|
98
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(NEW.workspace,0,1)
|
|
99
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+0,context_revision=context_revision+1;
|
|
100
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE NEW.workspace<>'global'
|
|
101
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
102
|
+
END;
|
|
103
|
+
CREATE TRIGGER lifecycle_version_dsh_memory_routine_revisions_delete AFTER DELETE ON dsh_memory_routine_revisions BEGIN
|
|
104
|
+
INSERT INTO dsh_memory_processing_state(workspace,source_revision,context_revision) VALUES(OLD.workspace,0,1)
|
|
105
|
+
ON CONFLICT(workspace) DO UPDATE SET source_revision=source_revision+0,context_revision=context_revision+1;
|
|
106
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) SELECT 'global',1 WHERE OLD.workspace<>'global'
|
|
107
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
108
|
+
END;
|
|
109
|
+
CREATE TRIGGER lifecycle_reference_dsh_memory_principle_sources_insert AFTER INSERT ON dsh_memory_principle_sources BEGIN
|
|
110
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
111
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
112
|
+
END;
|
|
113
|
+
CREATE TRIGGER lifecycle_reference_dsh_memory_principle_sources_update AFTER UPDATE ON dsh_memory_principle_sources BEGIN
|
|
114
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
115
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
116
|
+
END;
|
|
117
|
+
CREATE TRIGGER lifecycle_reference_dsh_memory_principle_sources_delete AFTER DELETE ON dsh_memory_principle_sources BEGIN
|
|
118
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
119
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
120
|
+
END;
|
|
121
|
+
CREATE TRIGGER lifecycle_reference_entries_insert AFTER INSERT ON entries BEGIN
|
|
122
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
123
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
124
|
+
END;
|
|
125
|
+
CREATE TRIGGER lifecycle_reference_entries_update AFTER UPDATE ON entries BEGIN
|
|
126
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
127
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
128
|
+
END;
|
|
129
|
+
CREATE TRIGGER lifecycle_reference_entries_delete AFTER DELETE ON entries BEGIN
|
|
130
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
131
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
132
|
+
END;
|
|
133
|
+
CREATE TRIGGER lifecycle_reference_entry_revisions_insert AFTER INSERT ON entry_revisions BEGIN
|
|
134
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
135
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
136
|
+
END;
|
|
137
|
+
CREATE TRIGGER lifecycle_reference_entry_revisions_update AFTER UPDATE ON entry_revisions BEGIN
|
|
138
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
139
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
140
|
+
END;
|
|
141
|
+
CREATE TRIGGER lifecycle_reference_entry_revisions_delete AFTER DELETE ON entry_revisions BEGIN
|
|
142
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
143
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
144
|
+
END;
|
|
145
|
+
CREATE TRIGGER lifecycle_reference_entry_revision_tags_insert AFTER INSERT ON entry_revision_tags BEGIN
|
|
146
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
147
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
148
|
+
END;
|
|
149
|
+
CREATE TRIGGER lifecycle_reference_entry_revision_tags_update AFTER UPDATE ON entry_revision_tags BEGIN
|
|
150
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
151
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
152
|
+
END;
|
|
153
|
+
CREATE TRIGGER lifecycle_reference_entry_revision_tags_delete AFTER DELETE ON entry_revision_tags BEGIN
|
|
154
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
155
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
156
|
+
END;
|
|
157
|
+
CREATE TRIGGER lifecycle_reference_context_feedback_insert AFTER INSERT ON context_feedback BEGIN
|
|
158
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
159
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
160
|
+
END;
|
|
161
|
+
CREATE TRIGGER lifecycle_reference_context_feedback_update AFTER UPDATE ON context_feedback BEGIN
|
|
162
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
163
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
164
|
+
END;
|
|
165
|
+
CREATE TRIGGER lifecycle_reference_context_feedback_delete AFTER DELETE ON context_feedback BEGIN
|
|
166
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
167
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
168
|
+
END;
|
|
169
|
+
CREATE TRIGGER lifecycle_reference_auto_global_projections_insert AFTER INSERT ON auto_global_projections BEGIN
|
|
170
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
171
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
172
|
+
END;
|
|
173
|
+
CREATE TRIGGER lifecycle_reference_auto_global_projections_update AFTER UPDATE ON auto_global_projections BEGIN
|
|
174
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
175
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
176
|
+
END;
|
|
177
|
+
CREATE TRIGGER lifecycle_reference_auto_global_projections_delete AFTER DELETE ON auto_global_projections BEGIN
|
|
178
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
179
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
180
|
+
END;
|
|
181
|
+
CREATE TRIGGER lifecycle_reference_auto_global_application_receipts_insert AFTER INSERT ON auto_global_application_receipts BEGIN
|
|
182
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
183
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
184
|
+
END;
|
|
185
|
+
CREATE TRIGGER lifecycle_reference_auto_global_application_receipts_update AFTER UPDATE ON auto_global_application_receipts BEGIN
|
|
186
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
187
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
188
|
+
END;
|
|
189
|
+
CREATE TRIGGER lifecycle_reference_auto_global_application_receipts_delete AFTER DELETE ON auto_global_application_receipts BEGIN
|
|
190
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
191
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
192
|
+
END;
|
|
193
|
+
CREATE TRIGGER lifecycle_reference_memory_forget_tombstones_insert AFTER INSERT ON memory_forget_tombstones BEGIN
|
|
194
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
195
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
196
|
+
END;
|
|
197
|
+
CREATE TRIGGER lifecycle_reference_memory_forget_tombstones_update AFTER UPDATE ON memory_forget_tombstones BEGIN
|
|
198
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
199
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
200
|
+
END;
|
|
201
|
+
CREATE TRIGGER lifecycle_reference_memory_forget_tombstones_delete AFTER DELETE ON memory_forget_tombstones BEGIN
|
|
202
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
203
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
204
|
+
END;
|
|
205
|
+
CREATE TRIGGER lifecycle_reference_memory_derivations_insert AFTER INSERT ON memory_derivations BEGIN
|
|
206
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
207
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
208
|
+
END;
|
|
209
|
+
CREATE TRIGGER lifecycle_reference_memory_derivations_update AFTER UPDATE ON memory_derivations BEGIN
|
|
210
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
211
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
212
|
+
END;
|
|
213
|
+
CREATE TRIGGER lifecycle_reference_memory_derivations_delete AFTER DELETE ON memory_derivations BEGIN
|
|
214
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
215
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
216
|
+
END;
|
|
217
|
+
CREATE TRIGGER lifecycle_reference_memory_evolution_settings_insert AFTER INSERT ON memory_evolution_settings BEGIN
|
|
218
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
219
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
220
|
+
END;
|
|
221
|
+
CREATE TRIGGER lifecycle_reference_memory_evolution_settings_update AFTER UPDATE ON memory_evolution_settings BEGIN
|
|
222
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
223
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
224
|
+
END;
|
|
225
|
+
CREATE TRIGGER lifecycle_reference_memory_evolution_settings_delete AFTER DELETE ON memory_evolution_settings BEGIN
|
|
226
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
227
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
228
|
+
END;
|
|
229
|
+
CREATE TRIGGER lifecycle_reference_memory_index_facts_insert AFTER INSERT ON memory_index_facts BEGIN
|
|
230
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
231
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
232
|
+
END;
|
|
233
|
+
CREATE TRIGGER lifecycle_reference_memory_index_facts_update AFTER UPDATE ON memory_index_facts BEGIN
|
|
234
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
235
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
236
|
+
END;
|
|
237
|
+
CREATE TRIGGER lifecycle_reference_memory_index_facts_delete AFTER DELETE ON memory_index_facts BEGIN
|
|
238
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
239
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
240
|
+
END;
|
|
241
|
+
CREATE TRIGGER lifecycle_reference_memory_index_settings_insert AFTER INSERT ON memory_index_settings BEGIN
|
|
242
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
243
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
244
|
+
END;
|
|
245
|
+
CREATE TRIGGER lifecycle_reference_memory_index_settings_update AFTER UPDATE ON memory_index_settings BEGIN
|
|
246
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
247
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
248
|
+
END;
|
|
249
|
+
CREATE TRIGGER lifecycle_reference_memory_index_settings_delete AFTER DELETE ON memory_index_settings BEGIN
|
|
250
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
251
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
252
|
+
END;
|
|
253
|
+
CREATE TRIGGER lifecycle_reference_memory_index_sources_insert AFTER INSERT ON memory_index_sources BEGIN
|
|
254
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
255
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
256
|
+
END;
|
|
257
|
+
CREATE TRIGGER lifecycle_reference_memory_index_sources_update AFTER UPDATE ON memory_index_sources BEGIN
|
|
258
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
259
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
260
|
+
END;
|
|
261
|
+
CREATE TRIGGER lifecycle_reference_memory_index_sources_delete AFTER DELETE ON memory_index_sources BEGIN
|
|
262
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
263
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
264
|
+
END;
|
|
265
|
+
CREATE TRIGGER lifecycle_reference_external_skill_entries_insert AFTER INSERT ON external_skill_entries BEGIN
|
|
266
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
267
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
268
|
+
END;
|
|
269
|
+
CREATE TRIGGER lifecycle_reference_external_skill_entries_update AFTER UPDATE ON external_skill_entries BEGIN
|
|
270
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
271
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
272
|
+
END;
|
|
273
|
+
CREATE TRIGGER lifecycle_reference_external_skill_entries_delete AFTER DELETE ON external_skill_entries BEGIN
|
|
274
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
275
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
276
|
+
END;
|
|
277
|
+
CREATE TRIGGER lifecycle_reference_external_skills_insert AFTER INSERT ON external_skills BEGIN
|
|
278
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
279
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
280
|
+
END;
|
|
281
|
+
CREATE TRIGGER lifecycle_reference_external_skills_update AFTER UPDATE ON external_skills BEGIN
|
|
282
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
283
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
284
|
+
END;
|
|
285
|
+
CREATE TRIGGER lifecycle_reference_external_skills_delete AFTER DELETE ON external_skills BEGIN
|
|
286
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
287
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
288
|
+
END;
|
|
289
|
+
CREATE TRIGGER lifecycle_reference_entry_links_insert AFTER INSERT ON entry_links BEGIN
|
|
290
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
291
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
292
|
+
END;
|
|
293
|
+
CREATE TRIGGER lifecycle_reference_entry_links_update AFTER UPDATE ON entry_links BEGIN
|
|
294
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
295
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
296
|
+
END;
|
|
297
|
+
CREATE TRIGGER lifecycle_reference_entry_links_delete AFTER DELETE ON entry_links BEGIN
|
|
298
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
299
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
300
|
+
END;
|
|
301
|
+
CREATE TRIGGER lifecycle_reference_knowledge_sources_insert AFTER INSERT ON knowledge_sources BEGIN
|
|
302
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
303
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
304
|
+
END;
|
|
305
|
+
CREATE TRIGGER lifecycle_reference_knowledge_sources_update AFTER UPDATE ON knowledge_sources BEGIN
|
|
306
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
307
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
308
|
+
END;
|
|
309
|
+
CREATE TRIGGER lifecycle_reference_knowledge_sources_delete AFTER DELETE ON knowledge_sources BEGIN
|
|
310
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
311
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
312
|
+
END;
|
|
313
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_insert AFTER INSERT ON memory_episodes BEGIN
|
|
314
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
315
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
316
|
+
END;
|
|
317
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_update AFTER UPDATE ON memory_episodes BEGIN
|
|
318
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
319
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
320
|
+
END;
|
|
321
|
+
CREATE TRIGGER lifecycle_reference_memory_episodes_delete AFTER DELETE ON memory_episodes BEGIN
|
|
322
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
323
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
324
|
+
END;
|
|
325
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_insert AFTER INSERT ON memory_episode_entries BEGIN
|
|
326
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
327
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
328
|
+
END;
|
|
329
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_update AFTER UPDATE ON memory_episode_entries BEGIN
|
|
330
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
331
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
332
|
+
END;
|
|
333
|
+
CREATE TRIGGER lifecycle_reference_memory_episode_entries_delete AFTER DELETE ON memory_episode_entries BEGIN
|
|
334
|
+
INSERT INTO dsh_memory_processing_state(workspace,context_revision) VALUES('global',1)
|
|
335
|
+
ON CONFLICT(workspace) DO UPDATE SET context_revision=context_revision+1;
|
|
336
|
+
END;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kiokuko-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Kiokuko plugin for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"scripts/smoke-laya-coreml.mjs",
|
|
45
45
|
"scripts/evaluate-answer-review.mjs",
|
|
46
46
|
"scripts/answer-review-evaluation.mjs",
|
|
47
|
-
"scripts/answer-review-evaluation.d.mts"
|
|
47
|
+
"scripts/answer-review-evaluation.d.mts",
|
|
48
|
+
"scripts/verification-completion.mjs"
|
|
48
49
|
],
|
|
49
50
|
"exports": {
|
|
50
51
|
".": {
|
|
@@ -245,7 +246,10 @@
|
|
|
245
246
|
"test:models:web": "npm run build && node scripts/verify-models-web.mjs",
|
|
246
247
|
"test:code-intelligence": "node scripts/run-code-intelligence.mjs",
|
|
247
248
|
"test:code-intelligence:packed": "node scripts/run-code-intelligence.mjs --packed",
|
|
248
|
-
"test:code-intelligence:benchmark": "node scripts/benchmark-code-intelligence.mjs"
|
|
249
|
+
"test:code-intelligence:benchmark": "node scripts/benchmark-code-intelligence.mjs",
|
|
250
|
+
"verify": "node scripts/verify.mjs",
|
|
251
|
+
"verify:plan": "node scripts/verify.mjs --plan",
|
|
252
|
+
"test:verification": "node --test scripts/verification-contract.test.mjs"
|
|
249
253
|
},
|
|
250
254
|
"dependencies": {
|
|
251
255
|
"@deepseek-ai/cosmokit": "1.8.5",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { completeVerification } from './verification-completion.mjs';
|
|
1
2
|
import { parseArgs } from 'node:util'
|
|
2
3
|
import { readFile, writeFile } from 'node:fs/promises'
|
|
3
4
|
import { createHash } from 'node:crypto'
|
|
@@ -126,3 +127,5 @@ const json=JSON.stringify(report,null,2)+'\n'
|
|
|
126
127
|
if(values.output)await writeFile(values.output,json)
|
|
127
128
|
process.stdout.write(json)
|
|
128
129
|
if(report.cases.some(row=>row.status!=='completed') || warmupCases.some(row => row.status !== 'completed'))process.exitCode=1
|
|
130
|
+
|
|
131
|
+
completeVerification({});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { writeFileSync } from 'node:fs';
|
|
2
|
+
export function completeVerification(evidence = {}) {
|
|
3
|
+
if (!process.env.KIOKUKO_VERIFY_COMPLETION_FILE || process.exitCode && process.exitCode !== 0) return;
|
|
4
|
+
const {KIOKUKO_VERIFY_CHECK_ID:id,KIOKUKO_VERIFY_NONCE:nonce}=process.env;
|
|
5
|
+
if (!id || !nonce) throw new Error('Missing verification completion identity');
|
|
6
|
+
writeFileSync(process.env.KIOKUKO_VERIFY_COMPLETION_FILE,JSON.stringify({schema:'verification-completion-v1',id,nonce,status:'passed',evidence}),{flag:'wx'});
|
|
7
|
+
}
|
|
8
|
+
export function validCompletion(value, id, nonce, required = {}) {
|
|
9
|
+
return !!(value?.schema === 'verification-completion-v1' && value.id === id && value.nonce === nonce && value.status === 'passed'
|
|
10
|
+
&& value.evidence && typeof value.evidence === 'object' && !Array.isArray(value.evidence)
|
|
11
|
+
&& Object.entries(required).every(([key,expected])=>value.evidence[key]===expected));
|
|
12
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { completeVerification } from './verification-completion.mjs';
|
|
1
2
|
import { readFile, readdir, writeFile } from 'node:fs/promises'
|
|
2
3
|
import { createHash } from 'node:crypto'
|
|
3
4
|
import { join, relative, resolve } from 'node:path'
|
|
@@ -28,3 +29,5 @@ else {
|
|
|
28
29
|
if (changed.length) throw new Error(`Lisp vendor content differs from the reviewed manifest: ${JSON.stringify(changed)}`)
|
|
29
30
|
}
|
|
30
31
|
console.log(`Lisp vendor: ${Object.keys(files).length} files verified`)
|
|
32
|
+
|
|
33
|
+
completeVerification({});
|
|
@@ -63,3 +63,15 @@ DSH の実装タスクでは、初回の変更前に `coding_workflow status`
|
|
|
63
63
|
- ユーザーには、変更内容、確認できた通常利用、実行した検証と結果、残る制約を簡潔に報告する。再現・実装・ローカル検証・公開/本番反映は別々の事実として扱う。許可のない公開やデプロイを完了条件に追加しない。
|
|
64
64
|
|
|
65
65
|
この Skill は実行時の判断を支援する手順であり、ホストによる毎回の呼び出しや不具合の完全防止を保証する仕組みではない。
|
|
66
|
+
|
|
67
|
+
## Repository verification entry
|
|
68
|
+
|
|
69
|
+
When the target repository defines `npm run verify`, read `npm run verify:plan`
|
|
70
|
+
(or `npm run verify -- --plan --profile <profile>`) and use that declared scope.
|
|
71
|
+
Run the same profile locally and in CI; do not reconstruct independent checks
|
|
72
|
+
from CI YAML. `npm test` and focused commands are partial evidence. The JSON
|
|
73
|
+
result records each required check, prerequisite failure, platform exclusion,
|
|
74
|
+
and source/artifact identity. Only a current full-scope `completionReady: true`
|
|
75
|
+
result supports full verification. Recheck saved results with
|
|
76
|
+
`npm run verify -- --status <result.json>` after related edits or artifact changes.
|
|
77
|
+
Never derive skip permissions or expected failures from observed test output.
|
|
@@ -100,4 +100,17 @@ the recovery reference before changing strategy. Do not retry an unchanged
|
|
|
100
100
|
failed operation or hide failures by weakening checks. Stop on completion or a
|
|
101
101
|
specific blocker requiring unavailable access, evidence or user action.
|
|
102
102
|
|
|
103
|
+
|
|
104
|
+
## Repository verification entry
|
|
105
|
+
|
|
106
|
+
When the target repository defines `npm run verify`, read `npm run verify:plan`
|
|
107
|
+
(or `npm run verify -- --plan --profile <profile>`) and use that declared scope.
|
|
108
|
+
Run the same profile locally and in CI; do not reconstruct independent checks
|
|
109
|
+
from CI YAML. `npm test` and focused commands are partial evidence. The JSON
|
|
110
|
+
result records each required check, prerequisite failure, platform exclusion,
|
|
111
|
+
and source/artifact identity. Only a current full-scope `completionReady: true`
|
|
112
|
+
result supports full verification. Recheck saved results with
|
|
113
|
+
`npm run verify -- --status <result.json>` after related edits or artifact changes.
|
|
114
|
+
Never derive skip permissions or expected failures from observed test output.
|
|
115
|
+
|
|
103
116
|
<!-- /kiokuko:runtime -->
|